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

From: Stefan Lindner <stefan(dot)lindner(at)visionet(dot)de>
To: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14658: psql set autocommit in command line
Date: 2017-05-18 14:02:43
Message-ID: 039C594113548C408DC0863499EAEB420A8D8280@BOSS2.visionetlocal.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Thank you for your fast reply.

I did not notice "--no-psqlrc"

Kind regards

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

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

Browse pgsql-bugs by date

  From Date Subject
Next Message kwan.lim 2017-05-18 14:24:43 BUG #14659: "ERROR: could not open relation with OID" when creating table from SELECT with large row
Previous Message Tom Lane 2017-05-18 13:40:50 Re: BUG #14658: psql set autocommit in command line