Re: Small question

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Small question
Дата
Msg-id 200203222352.g2MNq7925429@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: Small question  (Jan Wieck <janwieck@yahoo.com>)
Список pgsql-general
Jan Wieck wrote:
> Bruce Momjian wrote:
> > Tom Lane wrote:
> > > Jan Wieck <janwieck@yahoo.com> writes:
> > > >> It seems like it might be possible for libpq (or other clients) to keep
> > > >> track of the transaction state by paying attention to BEGIN, COMMIT,
> > > >> ABORT command-completion tags and ERROR messages, but I haven't worked
> > > >> through the details.
> > >
> > > >         PQexec(c, "BEGIN; SELECT now()");
> > >
> > > >     Will there even be a BEGIN command tag sent?
> > >
> > > Yes.  PQexec doesn't tell you about it, but one comes through.  (This
> > > is certainly true in current sources, and I believe has always been true.)
> > >
> > > It'd be nastier if we allowed functions to change the transaction-block
> > > state, but we don't...
> >
> > We only need one bit to pass the transaction status back to the client.
> > Shame we can't throw that bit in there somewhere.
>
>     Huh?  You  can represent 3 possible states in one bit? I know
>     that I'm not too bad of a programmer, but you're  far  better
>     than me :-p
>

Compression, of course.  ;-)

--
  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 по дате отправления:

Предыдущее
От: Jan Wieck
Дата:
Сообщение: Re: Small question
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Postmaster processes running out of control?