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@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [EMAIL PROTECTED] so that your
       message can get through to the mailing list cleanly

Reply via email to