Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aFQQV-000215-AU for pgsql-bugs@arkaria.postgresql.org; Sat, 02 Jan 2016 17:57:15 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aFQQU-0001Si-P5 for pgsql-bugs@arkaria.postgresql.org; Sat, 02 Jan 2016 17:57:14 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aFQQT-0001S2-U7 for pgsql-bugs@postgresql.org; Sat, 02 Jan 2016 17:57:14 +0000 Received: from mail-qg0-x229.google.com ([2607:f8b0:400d:c04::229]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1aFQQM-00046y-1T for pgsql-bugs@postgresql.org; Sat, 02 Jan 2016 17:57:13 +0000 Received: by mail-qg0-x229.google.com with SMTP id e32so139041325qgf.3 for ; Sat, 02 Jan 2016 09:57:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:cc:date:in-reply-to:references :content-type:mime-version:content-transfer-encoding; bh=99ZbehFS/yZrh5mG4FJkFC+55KseKhw/WOU72cLYQzU=; b=FGzlhmCtT/4l87sw/+ZojGJRECYP1tF/OSoX3B5SPxy0kvdriMhdOBcJF5tbk3lLk6 6GnZZPz7Cjb2EcBsQJkxiOmXkZGu0fyZH10xeIiz7OTYUCK/n6yUUnw35YEZOWrjxVKh wbmv4iQtqAW11tmH7qGylyP7525ziODtSYwdkjmqaozAtL5nexWLK6pjjDt+IWqka/H8 vGRFgRJRQFfJ25QeQdhW/sadE/dwNHPJ5bYlqeEI25wwf8YhvzM0yxz1d1rUDLzGKT5h eG0I5KqiR5PvZ5GeybzQ4UHPvjLbAQLmDfcc4D1HaxNyBIe4TIrEdkdME3EUjtCJfozG G0Eg== X-Received: by 10.140.92.84 with SMTP id a78mr93337783qge.10.1451757424565; Sat, 02 Jan 2016 09:57:04 -0800 (PST) Received: from roblaptop ([187.65.206.117]) by smtp.gmail.com with ESMTPSA id 130sm9662633qhk.45.2016.01.02.09.57.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 02 Jan 2016 09:57:04 -0800 (PST) Message-ID: <1451757411.6085.12.camel@gmail.com> Subject: Re: BUG #13841: Unable to set autocommit in psql From: rob stone To: Tom Lane , "David G. Johnston" Cc: Guillaume Lelarge , PostgreSQL Bugs List Date: Sun, 03 Jan 2016 04:56:51 +1100 In-Reply-To: <10012.1451667873@sss.pgh.pa.us> References: <20160101151017.1092.47045@wrigleys.postgresql.org> <10012.1451667873@sss.pgh.pa.us> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.3-1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On Fri, 2016-01-01 at 12:04 -0500, Tom Lane wrote: > "David G. Johnston" writes: > > > 2016-01-01 16:10 GMT+01:00 : > > > > Thought that I'd made a typo but entered as per doco. > > > Though when referencing the documentation in a report like this it > > is > > generally helpful to provide a link to said documentation so it at > > least > > can be checked. > > Indeed.  "set autocommit to off" hasn't been supported since PG 7.3, > more > than ten years ago.  So if there's still some documentation somewhere > recommending that, we really need to find and fix it. > > regards, tom lane Thanks for all the replies. If you search for "autocommit" in the 9.5rc1 doco the first entry displayed takes you to:- http://www.postgresql.org/docs/9.5/static/ecpg-sql-set-autocommit.html and as "set" is bog standard SQL syntax I thought you could use it within a psql session. However, as David pointed out you need to use \set. Using \set works fine. After perusing the psql doco there is mention there of using a .psqlrc file to hold psql session variables but I have yet to find any doco describing the syntax of this file. Nor can I find a file named psqlrc, as both are mentioned in the psql doco. So, maybe initdb needs to create a dummy psqlrc file which users can alter for global useage or copy over to their $HOME directory and alter it for personal use. My apologies for reporting this as a "bug" and wasting your time. Regards, Robert -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs