Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Xlvtq-0007I1-5f for pgsql-admin@arkaria.postgresql.org; Wed, 05 Nov 2014 08:25:06 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Xlvtp-0004wu-E0 for pgsql-admin@arkaria.postgresql.org; Wed, 05 Nov 2014 08:25:05 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Xlvto-0004wF-At for pgsql-admin@postgresql.org; Wed, 05 Nov 2014 08:25:04 +0000 Received: from plane.gmane.org ([80.91.229.3]) by magus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1Xlvtg-0003ab-2z for pgsql-admin@postgresql.org; Wed, 05 Nov 2014 08:25:03 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Xlvtc-0002eY-FM for pgsql-admin@postgresql.org; Wed, 05 Nov 2014 09:24:52 +0100 Received: from 217.110.94.121 ([217.110.94.121]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 05 Nov 2014 09:24:52 +0100 Received: from spam_eater by 217.110.94.121 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 05 Nov 2014 09:24:52 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-admin@postgresql.org From: Thomas Kellerer Subject: Re: Autocommit off in psql Date: Wed, 05 Nov 2014 09:24:40 +0100 Lines: 25 Message-ID: References: <1317404836.812502.1415174912912.JavaMail.yahoo@jws11120.mail.ir2.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 217.110.94.121 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 In-Reply-To: <1317404836.812502.1415174912912.JavaMail.yahoo@jws11120.mail.ir2.yahoo.com> X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Wolfgang Wilhelm schrieb am 05.11.2014 um 09:08: > There's an annoying difference between the database command line > tools. Oracle doesn't have a BEGIN for a transaction start but needs > a commit for saving changes. Psql on the other hand requires BEGIN to > start an transaction or it will be in autocommit mode. Guess how much > not so nice words I've heard in the last days because my team forgets > that transaction begin... > > Is there any way to make psql work a little bit more like sqlplus? > "Set autocommit off" is obviously no solution as it's not valid > anymore. You can use \set AUTOCOMMIT off in psql to turn off autocommit mode (note that this is case-sensitive!) I have that line in my psqlrc file so autocommit is automatically turned off. (although I rarely use psql or sqlplus) Regards Thomas -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin