Re: Backslashes in string literals

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: "Peter Eisentraut" <peter_e(at)gmx(dot)net>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Backslashes in string literals
Date: 2005-12-12 14:52:20
Message-ID: 439D39CD.EE98.0025.0@wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>>> On Sat, Dec 10, 2005 at 8:01 pm, in message
<200512110201(dot)jBB21PE16562(at)candle(dot)pha(dot)pa(dot)us>, Bruce Momjian
<pgman(at)candle(dot)pha(dot)pa(dot)us> wrote:
> Kevin Grittner wrote:
>> Since the
>> non- standard behavior is in the lexer, I couldn't see any
reasonable way
>> to base it on a runtime switch. I'm curious what is intended here.
Can
>> anyone give a one- paragraph explanation of how this configuration
option
>> will work?
>
> Have you read our documentation?
> http://www.postgresql.org/docs/8.1/static/sql- syntax.html#SQL-
SYNTAX- CONSTANTS
> http://www.postgresql.org/docs/8.1/static/runtime- config-
compatible.html#RUNTI
> ME- CONFIG- COMPATIBLE- VERSION

Yes.

> Between those and the release notes, I don't know what additional
> information you want. In the future you will set
> standard_conforming_strings to on and backslashes will be treated
> literally.

Perhaps my language was ambiguous. I'm not curious about the intended
behavior from a user perspective, but what I might have missed in the
source code which would have allowed me to write my patch to better
comply with the documentation you cited. Since the problem is in the
lexer, the only way I could see to implement it as a run-time
configuration option, rather than a compile-time option, would be to
duplicate the lexer and maintain two sets of rules in parallel. I
generally try to avoid maintaining two parallel copies of code. I'm
curious whether I missed some other programming approach.

-Kevin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2005-12-12 14:58:41 Re: psql patch: new host/port
Previous Message Andrew Dunstan 2005-12-12 14:46:22 default resource limits