pg.ddx.io pgsql-bugs@postgresql.org mailing list archivehelp / color / mirror / Atom feed
BUG #14658: psql set autocommit in command line 3+ messages / 3 participants [nested] [flat]
* BUG #14658: psql set autocommit in command line @ 2017-05-18 08:31 lindner@visionet.de 2017-05-18 13:40 ` Re: BUG #14658: psql set autocommit in command line Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 1 reply; 3+ messages in thread From: lindner@visionet.de @ 2017-05-18 08:31 UTC (permalink / raw) To: pgsql-bugs The following bug has been logged on the website: Bug reference: 14658 Logged by: Stefan Lindner Email address: lindner@visionet.de PostgreSQL version: 9.6.3 Operating system: CentOS 7.2 Description: We have set AUTOCOMMIT to off in our global psqlrc file. If I do the following, I can set it to on: > psql # \set AUTOCOMMIT on # \echo :AUTOCOMMIT on Now I start psql with command line parameters > psql --set AUTOCOMMIT on # \echo :AUTOCOMMIT off I expected that the command line --set overrides the global setting in psqlrc file. Am I wrong? And how can I set AUTOCOMMIT to ON per command line if I was wrong? -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #14658: psql set autocommit in command line 2017-05-18 08:31 BUG #14658: psql set autocommit in command line lindner@visionet.de @ 2017-05-18 13:40 ` Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 3+ messages in thread From: Tom Lane @ 2017-05-18 13:40 UTC (permalink / raw) To: lindner@visionet.de; +Cc: pgsql-bugs 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 ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #14658: psql set autocommit in command line @ 2017-05-18 14:02 Stefan Lindner <stefan.lindner@visionet.de> 0 siblings, 0 replies; 3+ messages in thread From: Stefan Lindner @ 2017-05-18 14:02 UTC (permalink / raw) To: 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 ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2017-05-18 14:02 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2017-05-18 08:31 BUG #14658: psql set autocommit in command line lindner@visionet.de 2017-05-18 13:40 ` Tom Lane <tgl@sss.pgh.pa.us> 2017-05-18 14:02 Re: BUG #14658: psql set autocommit in command line Stefan Lindner <stefan.lindner@visionet.de>
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