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

From Bruce Momjian
Subject Re: [PATCHES] Escape handling in strings
Date
Msg-id 200506170422.j5H4MgP08319@candle.pha.pa.us
Whole thread Raw
In response to Re: [PATCHES] Escape handling in strings  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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 am concerned we are going to generate confusing if we warn about one
use of backslashes in strings but not another.  I am thinking we will
just add the infrastructure for E'' in 8.1 (with the warning turned
off), and state we will warn about all backslashes in non-E strings in
8.2, and maybe go for literal strings in 8.3 or 8.4 depending on user
feedback.

--  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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCHES] Escape handling in strings
Next
From: "Thomas F. O'Connell"
Date:
Subject: Re: Autovacuum in the backend