How to detect if in transaction?

Поиск
Список
Период
Сортировка
От Basil Bourque
Тема How to detect if in transaction?
Дата
Msg-id 040F4D17-CCFC-49A8-96BF-524ECD3BF97C@me.com
обсуждение исходный текст
Ответы Re: How to detect if in transaction?  (John DeSoi <desoi@pgedit.com>)
Список pgsql-novice
How can I tell if a session is in a pending transaction? In other words, a "BEGIN TRANSACTION" has been issued but the
transactionhas not yet done a COMMIT or ROLLBACK. How can I ask if that is the condition? 

I've googled and searched the archives. Others have asked the question, but I've not seen an answer. I did read that
Postgresdefaults to AUTO-COMMIT until I issue a "BEGIN TRANSACTION". I want to programmatically detect that condition
forthe sake of defensive programming, logging, debugging, and so on. 

--Basil Bourque



В списке pgsql-novice по дате отправления:

Предыдущее
От: Mark Smith
Дата:
Сообщение: ECPG date output depends on database datestyle
Следующее
От: John DeSoi
Дата:
Сообщение: Re: How to detect if in transaction?