Corey Huinker <corey.huin...@gmail.com> writes:
> On Thu, Feb 9, 2017 at 3:13 PM, Tom Lane <t...@sss.pgh.pa.us> wrote:
>> IMO, an erroneous backslash command should have no effect, period.
> One way around this is to make the small change: commands with invalid
> expressions are ignored in interactive mode.
> Another way around it would be to ignore branching commands in interactive
> mode altogether and give a message like "branching commands not supported
> in interactive mode".
Uh, neither of those seem to be responding to my point. There is no case
in psql where a command with an invalid argument does something beyond
throwing an error. I do not think that \if is the place to start.
Having it act differently in interactive and noninteractive modes is an
even worse idea. AFAICS, the only real value of using \if interactively
is to test out something you are about to copy into a script. If we go
that route we're destroying the ability to test that way.
Basically, I think you need to start removing complexity (in the sense of
special cases), not adding more. I think Robert was saying the same
thing, though possibly I shouldn't put words in his mouth.
regards, tom lane
Sent via pgsql-hackers mailing list (email@example.com)
To make changes to your subscription: