Re: #escape_string_warning = off

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Jeff Davis <jdavis-pgsql(at)empires(dot)org>, pgsql-hackers(at)postgresql(dot)org, Marko Kreen <marko(at)l-t(dot)ee>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Subject: Re: #escape_string_warning = off
Date: 2005-08-03 13:40:24
Message-ID: 42F0C948.7090108@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message April Lorenzen 2005-08-03 14:31:18 pg_resetxlog says file system is read only?
Previous Message Peter Eisentraut 2005-08-03 13:01:07 Re: #escape_string_warning = off