Re: #escape_string_warning = off - Mailing list pgsql-hackers

From Oliver Jowett
Subject Re: #escape_string_warning = off
Date
Msg-id 42F0C948.7090108@opencloud.com
Whole thread Raw
In response to Re: #escape_string_warning = off  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: #escape_string_warning = off
Re: #escape_string_warning = off
List pgsql-hackers
Peter Eisentraut wrote:

>>Also, let's say I have apps now in 7.4/8.0, and I want them to be
>>forward-compatible. Should I make a type called E so that the E''
>>notation will work, and then use that for strings? What is the "right"
>>way to do it?
> 
> To be standards-conforming, don't use any backslash escapes.  If you must use 
> them, use the E'' notation.

That doesn't really answer the question, though, since none of
7.4/8.0/8.1 interprets '' strings in a strictly standards-conforming way
as I understand it.

The impression I got from previous discussion was that you need to check
the value of the standard_compliant_strings GUC, and double backslashes
inside '' only if it was false or missing.

-O


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: #escape_string_warning = off
Next
From: April Lorenzen
Date:
Subject: pg_resetxlog says file system is read only?