Re: pgbench - allow backslash continuations in \set expressions
Fabien COELHO <coelho@cri.ensmp.fr>
From: Fabien COELHO <coelho@cri.ensmp.fr>
To: PostgreSQL Developers <pgsql-hackers@postgresql.org>
Date: 2016-11-01T10:53:12Z
Lists: pgsql-hackers
Attachments
- pgbench-set-infered-continuation-1.patch (text/x-diff) patch
- cont2.sql (application/x-sql)
> 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.
Commits
-
Allow backslash line continuations in pgbench's meta commands.
- cdc2a70470bd 10.0 landed