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-11 02:01:25
Message-ID: 200512110201.jBB21PE16562@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Kevin Grittner wrote:
> >>> On Fri, Dec 9, 2005 at 11:24 am, in message
> <200512091824(dot)28760(dot)peter_e(at)gmx(dot)net>, Peter Eisentraut
> <peter_e(at)gmx(dot)net> wrote:
>
> > Kevin Grittner wrote:
> >> direction PostgreSQL is headed is to drop the nonstandard escapes,
> >> unless an extended literal is explicitly used. I've attached a
> patch
> >> which supports this as a configure option, using a
> >> -- enable- standard- strings switch.
> >
> > There is already a run- time configuration option
> > standard_conforming_strings which does what you seem to have in
> mind.
>
> As Bruce has mentioned, this is currently read-only, set to off.
>
> I needed something fast, and I could see a way to do it quickly with a
> configure switch, to compile it for standard behavior. 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#RUNTIME-CONFIG-COMPATIBLE-VERSION

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.

--
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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-12-11 02:07:44 Re: Reducing relation locking overhead
Previous Message Hannu Krosing 2005-12-11 01:55:38 Re: Reducing relation locking overhead