Re: pgbench - allow backslash continuations in \set expressions

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Daniel Verite <daniel(at)manitou-mail(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Rafia Sabih <rafia(dot)sabih(at)enterprisedb(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgbench - allow backslash continuations in \set expressions
Date: 2016-12-01 14:15:43
Message-ID: alpine.DEB.2.20.1612011508270.2577@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hello Daniel,

>> - if not, are possible corner case backward incompatibilities introduced
>> by such feature ok?
>
> In psql, if backslash followed by [CR]LF is interpreted as a
> continuation symbol, commands like these seem problematic
> on Windows since backslash is the directory separator:
>
> \cd \
> \cd c:\somepath\
>
> Shell invocations also come to mind:
> \! dir \

Thanks for pointing out these particular cases. I was afraid of such
potential issues, hence my questions...

Would requiring a space after the \ to accept these be ok, even if it is
somehow a regression?

By the way, how does changing directory to a directory with a space in the
name works? I.e. does "\<space>" already means something for some
commands?

Given these examples, I'm not sure I see a way out to having continuations
on all backslash commands without really breaking some stuff... Or maybe
having continuations for some commands only, but this is exactly what is
rejected by Tom about my patch...

--
Fabien.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2016-12-01 14:32:02 Re: Improving RLS planning
Previous Message Masahiko Sawada 2016-12-01 14:06:15 Re: [HACKERS] postgres 1 个(共 2 个) can pg 9.6 vacuum freeze skip page on index?