Re: Backslashes in string literals

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
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 15:11:12
Message-ID: 200512121511.jBCFBCn27166@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Kevin Grittner wrote:
> > 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.

Oh, that question. :-) We haven't looked yet at what it will require
to do this in the lexer, but I think what we will eventually do is to
add a more generalized filter to the lexer, and have the actions behave
differntly based on the boolean of whether we are using sql-standard
strings.

If you keep you eye on hackers or the committers messages you will see
when we commit the change for 8.2.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pollard, Mike 2005-12-12 15:15:03 Re: Different length lines in COPY CSV
Previous Message Tom Lane 2005-12-12 15:06:21 Re: default resource limits