Search Postgresql Archives

Re: Deferred triggers?

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

 



CSN wrote:
> Perhaps another possible feature request! I've looked
> through the docs and it doesn't appear that it's
> possible to create deferred triggers - i.e. they don't
> get called unless the current transaction commits. 

The semantics of such a thing appear to be indeterminate.  What happens
if something in the trigger would have caused the original transaction
to fail?  Most people would expect all changes made by the original
transaction, as well as those made by the trigger, to be rolled back.
Using deferred triggers as you've defined it would then require chainged
transactions, which could get very messy.

> (My understanding
> is that they currently get called immediately whether or not there is
> a transaction in progress.) 

There is always a transaction in progress.

-- 
Guy Rouillier


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match


[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