Kevin Grittner wrote:
> >>> On Wed, Feb 1, 2006 at 10:50 am, in message
> <[EMAIL PROTECTED]>, Bruce Momjian
> <pgman@candle.pha.pa.us> wrote: 
> >> 
> >> (1)  I couldn't figure out the best way to obtain a value for
> >> standard_conforming_strings in the psql version of the scanner.
> > 
> > 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.
> 
> My attempt to do as you suggest isn't working.  It behaves as though
> the standard_strings() function I added to common.c is always returning
> false.  (If I comment out the reference the function, and the else
> clause, I can get psql to work with the "on" state; otherwise, no joy. 
> The back end is working fine in all my tests.)  I tried to mimic the
> technique in the existing functions.  Can you give me a clue where I'm
> going wrong?

OK, I got it working.  The fix is to add GUC_REPORT to guc.c for
standard_conforming_strings.  See the same flag on
session_authorization.  That will cause libpq to see any changes made to
that variable.  Sorry I didn't know that detail before.

-- 
  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 5: don't forget to increase your free space map settings

Reply via email to