Re: Transaction IDs not the same in same transaction?
От | Michael Fuhr |
---|---|
Тема | Re: Transaction IDs not the same in same transaction? |
Дата | |
Msg-id | 20051023225244.GA26069@winnie.fuhr.org обсуждение исходный текст |
Ответ на | Re: Transaction IDs not the same in same transaction? (Steve V <dndlists@gmail.com>) |
Ответы |
Re: Transaction IDs not the same in same transaction?
|
Список | 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 по дате отправления: