Search Postgresql Archives

Re: PL/pgSQL : notion of deferred execution

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bruno Wolff III <bruno@xxxxxxxx> writes:
> On Sun, Dec 11, 2005 at 16:31:59 +0100,
>   Frank van Vugt <ftm.van.vugt@xxxxxxx> wrote:
>> Ratio: when deferred triggers on table A are used to calculate field values of 
>> table B (which then obviously need an update), one might want to prevent 
>> direct updates on these fields of table B

> It might also work for you to do this with access rights. The triggers can
> have different access rights than the user that caused the trigger to fire.

Yes.  Keying this off whether the triggers are deferred or not seems
a fairly bizarre choice --- that's surely not the primary property that
should determine what they can do to table B.  Also, it's quite unclear
which part of the system you expect to enforce the restriction against
which other part.  The suggestion as stated seemed to be to let a
trigger find out whether it itself is being fired in a deferred fashion,
but surely you don't want to trust the trigger to decide whether it may
update B.

			regards, tom lane


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux