On Wed, 26 Feb 2003, Grignon Etienne wrote:

>
> test=# SELECT createuser('toto', true, true, true);
> NOTICE:  Begin Of Update Permissions
> NOTICE:  End Of Update Permissions
> NOTICE:  TRIGGER
>  createuser
> ------------
>           0
> (1 row)
> test=#
>
>
> My problem is that the trigger for the insert is executed at the end of the
> procedure, so I can't do the update of the user's permissions.
>
> For me and my co-workers, the NOTICE TRIGGER should be before Begin Of
> Update Permissions.
>
> Could you explain to me how is it working ?

Right now AFAIR after triggers run at the end of the containing statement
(in this case the select of createuser) which is what causes the behavior
you're seeing.  I'm not sure of a good work around, off hand, for your
case though.




---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Reply via email to