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

From Robert Haas
Subject Re: proposal: multiple psql option -c
Date
Msg-id CA+TgmobGzoEwihMQ-PzWKkKrrVizxooVU0KDO_8Y5qd7U=wf_Q@mail.gmail.com
Whole thread Raw
In response to Re: proposal: multiple psql option -c  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
On Thu, Feb 4, 2016 at 8:35 PM, Peter Eisentraut <peter_e@gmx.net> wrote:
> I generally use the master branch psql for normal work, and this change
> has caused massive breakage for me.  It's straightforward to fix, but in
> some cases the breakage is silent, for example if you do
> something=$(psql -c ...) and the .psqlrc processing causes additional
> output.  I'm not sure what to make of it yet, but I want to mention it,
> because I fear there will be heartache.

I think this is a good thing to be concerned about, but I'm not sure
what to make of it either.  We could of course decide that -c implies
--no-psqlrc after all, for backward compatibility reasons.  That would
be sort of strange because then psql -c A -f B will imply --no-psqlrc
but psql -f B will not.  And that doesn't seem great either.  I'm
inclined toward thinking we should just accept that some people will
need to update their scripts, but if that turns out to make enough
people unhappy then I may regret thinking that.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [PATCH] Refactoring of LWLock tranches
Next
From: Jeff Janes
Date:
Subject: Bug in StartupSUBTRANS