pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: rob stone <floriparob@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Guillaume Lelarge <guillaume@lelarge.info>
Cc: PostgreSQL Bugs List <pgsql-bugs@postgresql.org>
Subject: Re: BUG #13841: Unable to set autocommit in psql
Date: Sun, 03 Jan 2016 04:56:51 +1100
Message-ID: <1451757411.6085.12.camel@gmail.com> (raw)
In-Reply-To: <10012.1451667873@sss.pgh.pa.us>
References: <20160101151017.1092.47045@wrigleys.postgresql.org>
	<CAECtzeXG+g_iLwdabKNatvFJrhemwGMUCgqNinANuQGPSP1eXg@mail.gmail.com>
	<CAKFQuwbTV2EimKMm5uRpu0GUx5CQKwp1YKAiXB2Adt3X1TEnGw@mail.gmail.com>
	<10012.1451667873@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On Fri, 2016-01-01 at 12:04 -0500, Tom Lane wrote:
> "David G. Johnston" <david.g.johnston@gmail.com> writes:
> > > 2016-01-01 16:10 GMT+01:00 <floriparob@gmail.com>:
> > > > 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



view thread (6+ messages)  latest in thread

Message-ID: <1451757411.6085.12.camel@gmail.com>
Permalink:  ../1451757411.6085.12.camel@gmail.com/
Also on:    postgresql.org/message-id/1451757411.6085.12.camel@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: floriparob@gmail.com, tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, guillaume@lelarge.info
  Subject: Re: BUG #13841: Unable to set autocommit in psql
  In-Reply-To: <1451757411.6085.12.camel@gmail.com>
  References: <20160101151017.1092.47045@wrigleys.postgresql.org> <CAECtzeXG+g_iLwdabKNatvFJrhemwGMUCgqNinANuQGPSP1eXg@mail.gmail.com> <CAKFQuwbTV2EimKMm5uRpu0GUx5CQKwp1YKAiXB2Adt3X1TEnGw@mail.gmail.com> <10012.1451667873@sss.pgh.pa.us> <1451757411.6085.12.camel@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox