On Sat, Oct 22, 2005 at 01:30:32PM -0700, Steve V wrote: > So I was finally able to get a compiled binary for the code in this > thread(thanks Magnus): > http://archives.postgresql.org/pgsql-general/2005-06/msg00709.php > > So everything seemed to be fine with my GetCurrentTransactionID() > function call returning the txn ID for each query I would run(as far > as I could tell). Then I tried running a txn with multiple queries, > and instead of just having one txn ID, each query had it's own. Does > that make any sense? I was under the impression that a regular > transaction block would have one txn ID assigned to it for its > duration. It makes sense if you're running PostgreSQL 8.0 or later and are using subtransactions, whether explicitly or implicitly. The example you posted didn't show the trigger definition or function -- does the function do any error trapping? Maybe you need GetTopTransactionId() instead of GetCurrentTransactionID(). Why do you need the transaction ID at all? Might the xmin system column serve your purpose? -- Michael Fuhr ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your message can get through to the mailing list cleanly