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: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Backslashes in string literals
Date: 2006-02-01 16:50:44
Message-ID: 200602011650.k11GoiU23147@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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!

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.

--
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 Bruce Momjian 2006-02-01 16:52:01 Re: Failed install - libgen.so doesn't exist
Previous Message Tom Lane 2006-02-01 16:47:15 Re: Failed install - libgen.so doesn't exist