Re: BUG #14658: psql set autocommit in command line

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: lindner(at)visionet(dot)de
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #14658: psql set autocommit in command line
Date: 2017-05-18 13:40:50
Message-ID: 16058.1495114850@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

lindner(at)visionet(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Stefan Lindner 2017-05-18 14:02:43 Re: BUG #14658: psql set autocommit in command line
Previous Message Sveinn Sveinsson 2017-05-18 11:57:59 Re: [BUGS] BUG #14657: Server process segmentation fault in v10, May 10th dev snapshot