pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Grignon Etienne <egrignon@egrignon.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: pgsql problem
Date: Thu, 27 Feb 2003 14:04:36 -0800 (PST)
Message-ID: <20030227140020.U90162-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <00c801c2dde8$f69de7d0$0201a8c0@zimmer>


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.






view thread (6+ messages)  latest in thread

Message-ID: <20030227140020.U90162-100000@megazone23.bigpanda.com>
Permalink:  ../20030227140020.U90162-100000@megazone23.bigpanda.com/
Also on:    postgresql.org/message-id/20030227140020.U90162-100000@megazone23.bigpanda.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: sszabo@megazone23.bigpanda.com, egrignon@egrignon.com
  Subject: Re: pgsql problem
  In-Reply-To: <20030227140020.U90162-100000@megazone23.bigpanda.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox