On Mon, Mar 21, 2016 at 3:42 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> On Mon, Mar 21, 2016 at 3:01 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> Um, why exactly? That psql behavior is of really ancient standing, and
>>> we have not had complaints about it.
>
>> I think that's mostly because the psql metacommands are ridiculously
>> impoverished. I'm guessing that pgbench's expression language is
>> eventually going to support strings as a data type, for example, and
>> those strings might want to contain backlashes.
>
> Sure, but once we define strings, they'll be quoted, and the behavior
> can/should/will be different for a backslash inside quotes than one
> outside them --- as it is already in psql. Moreover, if you're on
> board with the backslash-newline proposal, you've already bought into
> the idea that backslashes outside quotes will behave differently from
> those inside.
Mmph. I just don't see any benefit in being able to start a command
in the middle of a line. Even if it's not dangerous to future things
we might want o implement, I'd argue it's still poor style, and of no
practical utility. But if I lose that argument, then I do.
>>> Shall I make a patch that allows backslash-newline to be handled this way
>>> in both psql and pgbench backslash commands?
>
>> I certainly don't object to such a patch, although if it's between you
>> writing that patch and you getting Tomas Vondra's multivariate
>> statistics stuff committed, I'll take the latter. :-)
>
> I'll get to that, but I'd like to get this area fully dealt with before
> context-swapping to that one.
Understood.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company