Received: from virtual.zia.ms.it (root@virtual.zia.ms.it [195.103.158.42]) by hub.org (8.8.8/8.8.8) with ESMTP id KAA16452 for ; Thu, 17 Sep 1998 10:46:37 -0400 (EDT) (envelope-from fede@link.it) Received: from link.it (rub080.pi00.c1.interbusiness.it [194.184.214.80]) by virtual.zia.ms.it (8.8.8/8.8.8) with ESMTP id QAA03197; Thu, 17 Sep 1998 16:46:14 +0200 Sender: federico@link.it Message-ID: <360120B3.9EAE4313@link.it> Date: Thu, 17 Sep 1998 16:46:11 +0200 From: Federico Passaro X-Mailer: Mozilla 4.03 [en] (X11; I; Linux 2.0.34 i586) MIME-Version: 1.0 To: ajoppich@usa.net, PostgreSQL sql Subject: Re: [SQL] Turn autocommit off ? References: <360118DF.37BC@usa.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Andreas Joppich wrote: > Hi there ! > > It has now happened several times that I wanted to rollback some > changes (like update, delete,...) I made to some tables. And since I > always forget to start a transaction, a simple ROLLBACK doesn't work > because of that quiet annoying autocommit in psql. > > I'd like to have automatically started a transaction which explicitly > must be termintated with commit or rollback. > > Is there a way to turn autocommit off ? If not, perhaps it could > be a feature for the todo list ? > > I'm currently using the cvs from last sunday on linux 2.1.119. > > Thanks for any hints. > > Andreas You can edit your ~/.psqlrc (or /etc/psqlrc) an put a begin; line into it. The drawback is that if you do not issue a "commit" command you loose all your changes. Cheers federico