Re: Transaction IDs not the same in same transaction? - Mailing list pgsql-general

From Michael Fuhr
Subject Re: Transaction IDs not the same in same transaction?
Date
Msg-id 20051023225244.GA26069@winnie.fuhr.org
Whole thread Raw
In response to Re: Transaction IDs not the same in same transaction?  (Steve V <dndlists@gmail.com>)
Responses Re: Transaction IDs not the same in same transaction?  (Steve V <dndlists@gmail.com>)
List pgsql-general
On Sun, Oct 23, 2005 at 02:00:47PM -0700, Steve V wrote:
> > Ah, you had not even mentioned that the trigger was in pltcl.
> > spi_exec runs everything in subtransactions as of 8.0, so that
> > it can catch errors and propagate them back as Tcl errors.
>
> Okay, so are there any possible options? Would GetTopTransactionId()
> work, as Michael suggested further up?

I just did some tests with a pltcl function that uses spi_exec in
an AFTER trigger and GetTopTransactionId() returned the same value
for each of several inserts and updates that were in the same
transaction.  However, I can't say whether this will work for you
without seeing your code.  It would be easier for us to help -- and
you'd get a solution sooner -- if you'd post a minimal but complete
example that shows what you're doing and that exhibits the behavior
you're seeing.

--
Michael Fuhr

pgsql-general by date:

Previous
From: Steve V
Date:
Subject: Re: Transaction IDs not the same in same transaction?
Next
From: Steve V
Date:
Subject: Re: Transaction IDs not the same in same transaction?