Re: Automatic transactions in psql - Mailing list pgsql-patches

From Greg Sabino Mullane
Subject Re: Automatic transactions in psql
Date
Msg-id E16eJ6e-0000xF-00@maynard.mail.mindspring.net
Whole thread Raw
In response to Automatic transactions in psql  ("Greg Sabino Mullane" <greg@turnstep.com>)
Responses Re: Automatic transactions in psql  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


> I believe Fernando Nasser at Red Hat is currently working on backend
> changes to do this properly; so I recommend we not apply the psql hack

Sounds good to me. If he is not, I'll volunteer if someone will point
me in the right direction.


> The notion of customizing the psql prompt based on
> in-an-xact-block-or-not seems cool; but I do not see how to do it
> reliably without a protocol change, and it's not worth that.

<devil's advocate>
Surely it's being done at least as reliably as the hack in large_obj.c? :)
</da>
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. And a dropped connection means we switch to "not in a
transaction"

-----BEGIN PGP SIGNATURE-----
Comment: http://www.turnstep.com/pgp.html

iD8DBQE8dnuTvJuQZxSWSsgRAnnFAJ9vz2o1bYiDB1jfnBE2cWohDAw0IwCglMX5
LUgc2CcQAsdueSpFWH+mwxE=
=e0qZ
-----END PGP SIGNATURE-----



pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Automatic transactions in psql
Next
From: Tom Lane
Date:
Subject: Re: Fix command completion for CREATE TABEL ... AS