Re: pgsql problem - Mailing list pgsql-sql

From Stephan Szabo
Subject Re: pgsql problem
Date
Msg-id 20030227140020.U90162-100000@megazone23.bigpanda.com
Whole thread Raw
In response to pgsql problem  ("Grignon Etienne" <egrignon@egrignon.com>)
List pgsql-sql
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.





pgsql-sql by date:

Previous
From: Itai Zukerman
Date:
Subject: Re: GiST, Not Using Index
Next
From: Itai Zukerman
Date:
Subject: Re: GiST, Not Using Index