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: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Backslashes in string literals
Date: 2006-01-25 22:46:35
Message-ID: 43D7AB6B.EE98.0025.0@wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

We found a bug in the code from my first patch. Since it was a low
frequency, non-destructive type of problem for us, I was able to take my
time and look over the task a little more closely. Attached is a patch
which should come close to implementing the TODO. In particular, it is
now implemented as a configurable option, which can be set in the
postgresql.conf file or at run time. There are some remaining issues:

(1) I couldn't figure out the best way to obtain a value for
standard_conforming_strings in the psql version of the scanner. For our
needs, could just assume it is always on, so I left it that way.
Someone with a better handle on this issue can hopefully finish that
part. Alternatively, if you give me some direction, I might have time
to generalize it. As far as I can tell from some testing today,
everything works fine issuing statements through a connection, but psql
isn't settled down.

(2) There should probably be some tests added to exercise these
options.

(3) I took a quick shot at the documentation, but I'm sure I didn't
cover everything.

(4) I made the changes on REL8_1_STABLE, since we need it now. This
patch is relative to that branch, not the trunk.

I hope this is helpful. If there's anything I should have done
differently, please let me know, so I can try to do better next time.

-Kevin

>>> On Fri, Dec 9, 2005 at 11:23 am, in message
<200512091723(dot)jB9HNjB16785(at)candle(dot)pha(dot)pa(dot)us>, Bruce Momjian
<pgman(at)candle(dot)pha(dot)pa(dot)us> wrote:

> I think we we will be turning on escape_string_warning in 8.2 and
allow
> standard_conforming_strings to be optionally turned on in that
releaes.
> I will keep the patch for us in completing that item.
>
> This has been saved for the 8.2 release:
>
> http://momjian.postgresql.org/cgi- bin/pgpatches_hold

Attachment Content-Type Size
configurable-unified-patch.txt application/octet-stream 23.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2006-01-25 23:02:44 Re: Cleaning up the INET/CIDR mess
Previous Message Matthew D. Fuller 2006-01-25 22:20:38 Re: Cleaning up the INET/CIDR mess