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

From Robert Haas
Subject Re: pgbench - allow backslash continuations in \set expressions
Date
Msg-id CA+TgmoYiu7FTa-Gv7mDYX7gVmN-2hzQ8BFnOhY0MZ67zO2VLiw@mail.gmail.com
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
List pgsql-hackers
On Tue, Nov 8, 2016 at 5:33 AM, Fabien COELHO <coelho@cri.ensmp.fr> wrote:
> I do not think that having both inferred continuations and explicit
> backslash continuations is desirable, it should be one or the other.

+1.  My vote is for backslash continuations.  Inferred continuations
require you to end your expressions in places where they can't legally
stop, so you can't do

\set x 2
+3

will not do the same thing as

\set x 2+
3

I don't want to get into a situation where every future bit of pgbench
syntax we want to introduce has to worry about what the interaction
with inferred continuations might be.  Backslash continuations are
kind of ugly, but it's a simple rule and virtually everybody who is
likely to be writing pgbench scripts will understand it immediately.

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



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: RV: Compilation warning on 9.5
Next
From: Robert Haas
Date:
Subject: Re: commitfest 2016-11 status summary