Group exclusion question

Поиск
Список
Период
Сортировка
Искать

Group exclusion question

От:
Denis Chavez <dnchavez@gmx.net>
Дата:
Hello!

I wonder if it is possible to create mutually exclusive groups in postgres.
I want to implement a rbac scheme and users must belong to only one group. I
tried:

CREATE TRIGGER group_exclusion BEFORE UPDATE OR INSERT ON pg_group 
FOR EACH ROW EXECUTE PROCEDRE check_group_exclusion();

AND 

CREATE RULE group_exclusion AS ON UPDATE TO pg_group WHERE not NEW.grolist =
OLD.grolist ....

but it seems that the CREATE USER command doesn't fire the UPDATE of
pg_group with neither triggers nor rules and so nothing happens. Any ideas or
comments?

Regards and thanks in advance.
Denis

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

FAQ