Re: [BUGS] BUG #14658: psql set autocommit in command line - Mailing list pgsql-bugs

From Stefan Lindner
Subject Re: [BUGS] BUG #14658: psql set autocommit in command line
Date
Msg-id 039C594113548C408DC0863499EAEB420A8D8280@BOSS2.visionetlocal.local
Whole thread Raw
In response to [BUGS] BUG #14658: psql set autocommit in command line  (lindner@visionet.de)
List pgsql-bugs
Thank you for your fast reply.

I did not notice "--no-psqlrc"

Kind regards

-----Ursprüngliche Nachricht-----
Von: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Gesendet: Donnerstag, 18. Mai 2017 15:41
An: Stefan Lindner
Cc: pgsql-bugs@postgresql.org
Betreff: Re: [BUGS] BUG #14658: psql set autocommit in command line

lindner@visionet.de writes:
> I expected that the command line --set overrides the global setting in
> psqlrc file.
> Am I wrong?

Yes.  The command line switches are processed first, then the rc file.
Since the rc file might contain arbitrary commands, it really can't be processed until psql is fully "open for
business",that is has completed all setup tasks. 

> And how can I set AUTOCOMMIT to ON per command line if I was wrong?

A brute-force way is --no-psqlrc.
        regards, tom lane


--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: [BUGS] BUG #14658: psql set autocommit in command line
Next
From: kwan.lim@gmail.com
Date:
Subject: [BUGS] BUG #14659: "ERROR: could not open relation with OID" when creatingtable from SELECT with large row