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