Re: [PATCHES] Escape handling in strings - Mailing list pgsql-hackers

From Michael Glaesemann
Subject Re: [PATCHES] Escape handling in strings
Date
Msg-id 3DA88477-07C4-4BBF-B59E-E698613A1AAC@myrealbox.com
Whole thread Raw
In response to Re: [PATCHES] Escape handling in strings  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PATCHES] Escape handling in strings
List pgsql-hackers
On Jun 17, 2005, at 12:33 PM, Tom Lane wrote:

> Bruce Momjian <pgman@candle.pha.pa.us> writes:
>
>> OK, the current patch warns about two things, \' with one message,  
>> and
>> any backslash in a non-E string with a different message.
>>
>
> Those are two very different things.  \' is easy to get around and
> there's no very good reason not to send '' instead.  But avoiding all
> use of \anything is impossible (think \\) so a non-suppressable  
> warning
> for that would be quite unacceptable IMHO.  I think it's much too  
> early
> to be throwing a warning for \anything anyway.  8.2 or so, OK, but not
> in this cycle.

I think giving users a longer period of time to make the necessary  
changes to their apps is very useful. If (as I understand) we're  
giving them the opportunity to use E'' strings if they want to  
continue to use \ for escaping, they can get rid of the warnings now,  
by using E'' strings or using '' to escape. Getting  people to  
migrate something such as this is difficult and will take them quite  
a while, I imagine. Giving them a longer time to change their  
behavior as well as reinforcing it with a warning is helpful. They  
can also easily check if they've got places they've missed in  
changing their code, because the warnings will be prominent in their  
logs.

Michael Glaesemann
grzm myrealbox com




pgsql-hackers by date:

Previous
From: "Thomas F. O'Connell"
Date:
Subject: Re: Autovacuum in the backend
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Autovacuum in the backend