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

From Tom Lane
Subject Re: [HACKERS] pgbench - allow backslash continuations in \set expressions
Date
Msg-id 13144.1484928857@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] pgbench - allow backslash continuations in \setexpressions  (Fabien COELHO <coelho@cri.ensmp.fr>)
List pgsql-hackers
Fabien COELHO <coelho@cri.ensmp.fr> writes:
>> Probably the easiest fix is to add a rule that explicitly matches this
>> situation:
>> {nonspace}+{continuation}  { ... throw back 2 chars and return the rest ... }

> Well, as the continuation characters must be ignored, so there is no need
> to throw them back, just adding the special case is enough?

True, for the moment.  If we ever put an action into the continuation rule
(e.g. to count line numbers in the script) it might be better the other
way, but for now this is fine.

> Note anyway that it is not necessarily what people may intend when using a
> continuation:

Yeah, but as you say this varies from one language to another.  I'm fine
with treating the continuation marker like whitespace.

Pushed with cosmetic adjustments (mostly, adding comments).
        regards, tom lane



pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: [HACKERS] Logical Replication WIP
Next
From: Petr Jelinek
Date:
Subject: Re: [HACKERS] Logical Replication WIP