Re: Automatic transactions in psql

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Automatic transactions in psql
Date: 2002-02-22 19:37:31
Message-ID: 18955.1014406651@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

"Greg Sabino Mullane" <greg(at)turnstep(dot)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

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2002-02-22 19:40:48 Re: IPv6 Support for INET/CIDR types.
Previous Message Vadim Kogan 2002-02-22 19:37:18 Re: IPv6 Support for INET/CIDR types.