Re: Automatic transactions in psql

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Automatic transactions in psql
Дата
Msg-id 18955.1014406651@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Automatic transactions in psql  ("Greg Sabino Mullane" <greg@turnstep.com>)
Список pgsql-patches
"Greg Sabino Mullane" <greg@turnstep.com> writes:
> I don't think it's that unreliable myself: as long as the backend outputs
> the standard confirmation message (e.g. "BEGIN"), we should always be
> able to keep track.

But it wouldn't.  At least not in the auto-transaction-start mode.
(We couldn't send "C BEGIN" in addition to a "C" for the command that
caused the transaction start; that'd be one too many "C", and would
at least potentially confuse clients.)  Moreover, I don't think psql
can reliably know whether the backend is in auto-start mode or not;
nor should it be responsible for understanding which SQL constructs
can cause an auto transaction start.  (Not all do.)

We could define an additional message that the backend would put out at
start and end of a transaction block, but ISTM that is a protocol
change.

> <devil's advocate>
> Surely it's being done at least as reliably as the hack in large_obj.c? :)
> </da>

That crock should be eliminated, not emulated ;-)

Being able to clean up large_obj.c might actually be a sufficient reason
to change the protocol ...

            regards, tom lane

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: IPv6 Support for INET/CIDR types.
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: IPv6 Support for INET/CIDR types.