From: | Christoph Berg <myon(at)debian(dot)org> |
---|---|
To: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
Cc: | PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pgbench - allow backslash continuations in \set expressions |
Date: | 2016-10-03 12:46:46 |
Message-ID: | 20161003124646.fizunc7gqyfzkriq@msg.df7cb.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Re: Fabien COELHO 2016-10-03 <alpine(dot)DEB(dot)2(dot)20(dot)1610031259400(dot)19411(at)lancre>
> > I "\set" a bunch of lengthy SQL commands in there, e.g.
>
> I agree that this looks like a desirable feature, however I would tend to
> see that as material for another independent patch.
Sure, my question was by no means intending to stop your pgbench patch
from going forward by adding extra requirements.
> Hmmm. I'm not sure how this is parsed. If this is considered a string '...',
> then maybe \set should wait for the end of the string instead of the end of
> the line, i.e. no continuation would be needed...
>
> \set config '
> SELECT name, ...
> CASE ... END
> FROM pg_settings
> WHERE ...;'
I guess that would be the sane solution here, yes. Not adding any \
chars at the end of the line would also mean cut-and-paste of the RHS
content would work.
Thanks for the feedback!
Christoph
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-10-03 12:51:49 | Re: [COMMITTERS] pgsql: Copy-editing for contrib/pg_visibility documentation. |
Previous Message | Anastasia Lubennikova | 2016-10-03 12:29:38 | Re: WIP: Covering + unique indexes. |