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

From Fabien COELHO
Subject Re: pgbench - allow backslash continuations in \set expressions
Date
Msg-id alpine.DEB.2.20.1611011147380.9978@lancre
Whole thread Raw
In response to pgbench - allow backslash continuations in \set expressions  (Fabien COELHO <coelho@cri.ensmp.fr>)
Responses Re: pgbench - allow backslash continuations in \set expressions  (Rafia Sabih <rafia.sabih@enterprisedb.com>)
List pgsql-hackers
> Attached patch does what is described in the title, hopefully. Continuations
> in other pgbench backslash-commands should be dealt with elsewhere...
>
> Also attached is a small test script.

Here is another approach, with "infered" continuations: no backslash is
needed, the parsing is pursued if the last token of the line cannot end an
expression (eg an operator) or if there is an unclosed parenthesis.

I think that backslashes are less surprising for the classically minded
user, but this one is more fun:-) Also, this version changes a little more
the scanner because on each token the next state (continued or not) must
be decided.

--
Fabien.
Attachment

pgsql-hackers by date:

Previous
From: Dilip Kumar
Date:
Subject: Re: [BUGS] BUG #14350: VIEW with INSTEAD OF INSERT TRIGGER and COPY. Missing feature or working as designed.
Next
From: Kyotaro HORIGUCHI
Date:
Subject: Re: Fix checkpoint skip logic on idle systems by tracking LSN progress