| From: | Michael Fuhr <mike(at)fuhr(dot)org> |
|---|---|
| To: | marcelo Cortez <jmdc_marcelo(at)yahoo(dot)com(dot)ar> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: trigger help |
| Date: | 2006-08-23 00:25:25 |
| Message-ID: | 20060823002525.GA59624@winnie.fuhr.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Arturo Perez | 2006-08-23 00:35:41 | Re: [8.1.4] Create index on timestamp fails |
| Previous Message | Oliver Jowett | 2006-08-22 23:51:44 | Re: question regarding upgrade from pg74.215.jdbc3.jar to |