|From:||Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>|
|To:||Rafia Sabih <rafia(dot)sabih(at)enterprisedb(dot)com>|
|Cc:||Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>|
|Subject:||Re: pgbench - allow backslash continuations in \set expressions|
|Views:||Raw Message | Whole Thread | Download mbox|
>> The attached patch adds backslash-return (well newline really) continuations
>> to all pgbench backslash-commands.
>> The attached test uses continuations on all such commands (sleep set
>> setshell and shell).
>> I think that adding continuations to psql should be a distinct patch.
> The patch does not apply on the latest head, I guess this requires
> rebasing since yours is posted in December.
Strange. Here is a new version and a test for all known backslash-commands
sh> git br test master
sh> git apply ~/pgbench-continuation-3.patch
sh> git diff
sh> cd src/bin/pgbench
sh> ./pgbench -t 1 -f SQL/cont.sql
debug(script=0,command=1): int 0
debug(script=0,command=2): int 1
debug(script=0,command=4): int 2
debug(script=0,command=8): int 4
transaction type: SQL/cont.sql
> Again, it is giving trailing whitespace errors (as I reported for the
> earlier version), plus it does not apply with git apply,
It does above with the attached version.
> hopefully that would be fixed once rebased. Other than that, I observed
> that if after backslash space is there, then the command fails.
Yes, this is expected.
> I think it should be something like if after backslash some spaces are
> there, followed by end-of-line then it should ignore these spaces and
> read next line, atleast with this new meaning of backslash.
Hmmm. This is not the behavior of backslash continuation in bash or
python, I do not think that this is desirable to have a different
> Otherwise, it should be mentioned in the docs that backslash should not
> be followed by space.
I'm not sure. Doc says that continuation is "backslash-return", it cannot
be more explicit. If it must say what it is not, where should it stop?
|Next Message||Etsuro Fujita||2017-01-11 12:15:34||Re: Push down more full joins in postgres_fdw|
|Previous Message||tushar||2017-01-11 12:03:13||Re: Parallel bitmap heap scan|