Automatic transactions in psql

From: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Subject: Automatic transactions in psql
Date: 2002-02-06 21:07:29
Message-ID: E16YZ9U-0001vx-00@granger.mail.mindspring.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The attached patch actually does two related things. First,
it keeps track of whether or not you are in a trnasaction
and modifies the prompt slightly when you are by putting
an asterick at the very front of it.

Secondly, it adds a "begin transaction" option that, when
enabled, ensures that you are always inside a transaction
while in psql, so you can always rollback. It does this
by issuing a BEGIN at the appropriate times. This patch
(if ever accepted) conflicts a bit with LO_RTANSACTION:
psql now *does* have a way to know if it is in a
transaction or not, so that part may need to get rewritten.

Greg Sabino Mullane greg(at)turnstep(dot)com
PGP Key: 0x14964AC8 200202061602

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

iQA/AwUBPGGZ37ybkGcUlkrIEQJhJQCgr2TEKcvPakEIC8Exn09pInLLOywAoL4I
uGv3TL6hUm/O1oSPrDVdmdc4
=rmRt
-----END PGP SIGNATURE-----

Attachment Content-Type Size
patch text/plain 8.6 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-02-06 21:14:33 Re: JOIN between three *simple* tables ...
Previous Message mkscott 2002-02-06 21:00:01 Re: Threaded PosgreSQL server

Browse pgsql-patches by date

  From Date Subject
Next Message Patrick Macdonald 2002-02-06 21:10:32 Re: contrib/pg_filedump - PostgreSQL File Dump Utility
Previous Message Tom Lane 2002-02-06 18:23:56 Re: contrib/pg_filedump - PostgreSQL File Dump Utility