Re: pgbench - allow backslash continuations in \set expressions - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pgbench - allow backslash continuations in \set expressions
Date
Msg-id 30650.1480549101@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgbench - allow backslash continuations in \set expressions  (Fabien COELHO <coelho@cri.ensmp.fr>)
Responses Re: pgbench - allow backslash continuations in \set expressions
Re: pgbench - allow backslash continuations in \set expressions
List pgsql-hackers
Fabien COELHO <coelho@cri.ensmp.fr> writes:
>> In short, I want to mark this RWF for today and ask for a version that
>> applies globally to all backslash commands in psql and pgbench.

> I'm not sure such a simple feature deserves so much energy.

It's not a "simple feature".  As you have it, it's a non-orthogonal wart.
It's like telling users that the return key only works in \set commands
and elsewhere you have to type shift-return to end a line.  I'm fine with
setting up a global policy that backslash-newline works to continue
backslash commands across lines, but I'm not fine with saying that it
only works in \set.  That's just weird, and the fact that you can do it
with a trivial patch doesn't make it less weird.  You're proposing to
put a new cognitive load on users because you can't be bothered to write
a patch that's not half-baked.  We don't do things like that around here.

FWIW, I looked a bit further and concluded that probably psqlscan.l
doesn't need to be modified; so likely you could do this across all of
pgbench's commands without touching psql.  That might be an acceptable
compromise for now, though I still think that as soon as we have this
for pgbench, users will start wanting it in psql.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: pgbench - allow backslash continuations in \set expressions
Next
From: Petr Jelinek
Date:
Subject: Re: Logical Replication WIP