Re: Backslashes in string literals

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Backslashes in string literals
Дата
Msg-id 200602100431.k1A4VlY21635@candle.pha.pa.us
обсуждение исходный текст
Ответ на Backslashes in string literals  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Ответы Re: Backslashes in string literals  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Список pgsql-hackers
Kevin Grittner wrote:
> >>> On Wed, Feb 1, 2006 at 10:50 am, in message
> <200602011650.k11GoiU23147@candle.pha.pa.us>, 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,
Pennsylvania19073
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: Feature request - Add microsecond as a time unit for
Следующее
От: Marko Kreen
Дата:
Сообщение: Re: streamlined standby procedure