Group exclusion question - Mailing list pgsql-general

From Denis Chavez
Subject Group exclusion question
Date
Msg-id 9371.1016661414@www47.gmx.net
Whole thread Raw
List pgsql-general
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


pgsql-general by date:

Previous
From: Vincent Stoessel
Date:
Subject: Re: bug/feature with upper function?
Next
From: Elaine Lindelef
Date:
Subject: BBS on postgreSQL?