| From: | Steve V <dndlists(at)gmail(dot)com> |
|---|---|
| To: | Michael Fuhr <mike(at)fuhr(dot)org> |
| Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Transaction IDs not the same in same transaction? |
| Date: | 2005-10-23 23:35:14 |
| Message-ID: | 58cabeec0510231635l5c93bc91t205f8e7065f8b43e@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
> 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.
Okay, so using GetTopTransactionId() will do the trick it sounds like.
To see all of what's happening, just place the pltcl function that I
posted earlier in this thread as an AFTER trigger, and run code
similar to that which I showed in my first post to start the thread.
Which library is GetTopTransactionId() available in? Do I need to
compile an library on my own that will expose it?
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Allen | 2005-10-24 00:03:39 | Re: out of memory for query result |
| Previous Message | Michael Fuhr | 2005-10-23 22:52:44 | Re: Transaction IDs not the same in same transaction? |