Re: proposal: multiple psql option -c - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: proposal: multiple psql option -c
Date
Msg-id CAFj8pRDZi5W66CJ7-FSjA76+=XTEG_0m+B5ak1WJJ9W636Ls+Q@mail.gmail.com
Whole thread Raw
In response to Re: proposal: multiple psql option -c  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Responses Re: proposal: multiple psql option -c  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-hackers


2015-08-28 22:07 GMT+02:00 Jim Nasby <Jim.Nasby@bluetreble.com>:
On 8/26/15 8:15 AM, Pavel Stehule wrote:
+      and then exit. This is useful in shell scripts. Start-up files
+      (<filename>psqlrc</filename> and <filename>~/.psqlrc</filename>) are
+      ignored with this option.

Sorry if this was discussed and I missed it, but I think this is a bad idea. There's already an option to control this. More important, there's no option to force the rc files to be used, so if -g disables them you'd be stuck with that.

I agree that the rc files are a danger when scripting, but if we want to do something about that then it needs to be consistent for ALL non-interactive use.

I don't see any problem to load rc files - but should I do it by default? I prefer

1. default - don't read rc
2. possible long option for forcing load rc for -c and -g
3. possible long option for forcing load any file as rc for -c and -g

Regards

Pavel
 
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL

Data in Trouble? Get it in Treble! http://BlueTreble.com

pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: proposal: multiple psql option -c
Next
From: "David G. Johnston"
Date:
Subject: Re: proposal: multiple psql option -c