| От | Tom Lane |
|---|---|
| Тема | Re: transaction in progress |
| Дата | |
| Msg-id | 13605.1070725235@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: transaction in progress (Bruce Momjian <pgman@candle.pha.pa.us>) |
| Список | pgsql-general |
Bruce Momjian <pgman@candle.pha.pa.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
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера