From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | Rick Gigger <rgigger(at)leadership-solutions(dot)net>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: transaction in progress |
Date: | 2003-12-06 15:40:35 |
Message-ID: | 13605.1070725235@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> libpq has PQtransactionStatus, though I wonder why we don't have this
> visible via a read-only GUC variable to make it easier for other languages.
Because it'd be useless --- the only way to interrogate it would be via
SHOW or some other SQL command, which would have the effect of changing
your transaction status, at least with client libraries that implement
autocommit. Not to mention that the SHOW itself would fail if you're
in a failed transaction.
You have to have an out-of-band mechanism for checking xact status.
Thus PQtransactionStatus. AFAIK there are already equivalent APIs
in other popular libraries.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2003-12-06 15:43:18 | Re: [GENERAL] Transaction Question |
Previous Message | Chris Travers | 2003-12-06 12:56:02 | Feedback? Is there interest in a PostgreSQL-based CRM suite friendly to shared hosting? |