Re: pgbench - allow backslash continuations in \set expressions

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: Rafia Sabih <rafia(dot)sabih(at)enterprisedb(dot)com>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgbench - allow backslash continuations in \set expressions
Date: 2016-11-08 22:28:51
Message-ID: CA+TgmoYiu7FTa-Gv7mDYX7gVmN-2hzQ8BFnOhY0MZ67zO2VLiw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Nov 8, 2016 at 5:33 AM, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-11-08 22:30:22 Re: RV: Compilation warning on 9.5
Previous Message Thomas Munro 2016-11-08 22:07:42 pg_serial early wraparound