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-02-02 20:20:20
Message-ID: 43E21524.EE98.0025.0@wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>>> On Wed, Feb 1, 2006 at 10:50 am, in message
<200602011650(dot)k11GoiU23147(at)candle(dot)pha(dot)pa(dot)us>, Bruce Momjian
<pgman(at)candle(dot)pha(dot)pa(dot)us> wrote:
> Kevin Grittner wrote:
>> 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.
>
> Sounds like you made great progress!

Thanks. It was actually pretty easy once I took the time to learn
flex. I'd kinda winged it in my emergency compile-time version. I'm
pretty sure that what I've done works; my biggest concern is over what
I've missed. For example, I was using pg_dump and pg_restore today and
realized that these, and other applications, likely need some kind of
work to support the feature.

> The proper way to do (1) is to call libpq's pqSaveParameterStatus()
from
> psql. Take a look for psql's session_username(). It is called
> everytime the prompt is printed if the username is required. One
great
> feature of using pqSaveParameterStatus() is that it reads server
packets
> and keeps the tracked value updated for you without query overhead.

I'll take a look at it. If I feel confident that I "get it", I'll do
the work and post another patch. Would you prefer that I resend the
whole works, or just the delta?

Also, since we're doing this out of need to fix the issue on our
production system, I'm compelled to work on the stable branch. Is it OK
to post patches from the tip of that branch, or should I really check
out the trunk (HEAD), too, and replicate it there for my patch posts?

-Kevin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2006-02-02 22:13:24 Re: Multiple logical databases
Previous Message Martijn van Oosterhout 2006-02-02 19:16:30 Re: Multiple logical databases