Re: Small question

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Small question
Дата
Msg-id 200203221848.g2MImaN18033@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: Small question  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Small question  (Jan Wieck <janwieck@yahoo.com>)
Список pgsql-general
Tom Lane wrote:
> Jan Wieck <janwieck@yahoo.com> writes:
> > Joep deVocht wrote:
> >> Is there a way to determine whether a transaction
> >> is started and not ended yet?
>
> >     I think it's time to add  a  little  boolean  function,  that
> >     actually  returns IsTransactionBlock(), and have a libpq side
> >     wrapper around PQfn() calling it.
>
> If you're in TRANSACTION ABORT state, I do not think that will work.
>
> Offhand this seems more of a protocol issue.  A straightforward solution
> would be to add a status indicator (with three states: out of
> transaction, in transaction, in aborted transaction) to the
> ReadyForQuery message, but we can't do that without a protocol change,
> which is probably more trouble than it's worth.

Yes, I was wondering if it was worth having the client call the function
at the end of every query.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Small question
Следующее
От: "David Siebert"
Дата:
Сообщение: Re: Yet another indexing issue.