Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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: patch
Description: text/plain (8.6 KB)

Responses

pgsql-hackers by date

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

pgsql-patches by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group