Re: Detecting uncommitted changes

Поиск
Список
Период
Сортировка
От Bill Moran
Тема Re: Detecting uncommitted changes
Дата
Msg-id 20111227133754.0e78452c.wmoran@potentialtech.com
обсуждение исходный текст
Ответ на Detecting uncommitted changes  (Thomas Kellerer <spam_eater@gmx.net>)
Ответы Re: Detecting uncommitted changes
Список pgsql-general
In response to Thomas Kellerer <spam_eater@gmx.net>:

> Hi,
>
> is there a way I can detect if the current session has any uncommitted changes?
>
> I'm not trying to find uncommitted changes from other sessions (connections) only for the *current* one.
>
> I thought there was a discussion on the mailing list that involved the txid_XXX functions, but I couldn't find that
anymore.
>
> Background:
> I'm trying to implement a "Do you want to commit your changes?" question in a SQL tool, when the user closes the
application.

If I'm understanding you correctly, you could just make it check the
transaction status.  If there's an active transaction, then there are
"uncommitted changes".

--
Bill Moran
http://www.potentialtech.com
http://people.collaborativefusion.com/~wmoran/

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

Предыдущее
От: Thomas Kellerer
Дата:
Сообщение: Detecting uncommitted changes
Следующее
От: Thomas Kellerer
Дата:
Сообщение: Re: Detecting uncommitted changes