Search Postgresql Archives

Re: trigger help

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

 



On Tue, Aug 22, 2006 at 02:37:19PM -0300, marcelo Cortez wrote:
> > This isn't a trigger function.  Are you sure "trigger" is the
> > word you meant?
> 
>  yes i do 

I see: the function you originally posted is called by a trigger
function.  In any case the answer is the same: functions can't start
or end transactions because they're already being executed in the
context of an outer transaction.  My previous message mentioned
using dblink as a way around that, but that's not necessarily good
design -- one problem is that if the outer transaction rolls back
then transactions that have already been committed over a dblink
connection won't be rolled back.  Doing transaction control from
outside the functions would probably be better.

-- 
Michael Fuhr


[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