Re: Escape handling in strings - Mailing list pgsql-patches

From Rod Taylor
Subject Re: Escape handling in strings
Date
Msg-id 1118898498.78366.100.camel@home
Whole thread Raw
In response to Re: Escape handling in strings  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Escape handling in strings
List pgsql-patches
On Wed, 2005-06-15 at 23:13 -0400, Bruce Momjian wrote:
> Sorry, one more thing.  :-(
>
> Let me add that I am not 100% sold on the idea either, but using the
> logic I outlined, I don't see how we can continue to do nothing about
> this issue, and I am afraid delay will only make an inevitable fix
> harder.  Maybe we will have to wait 2-3 years before we can make a non-E
> string handle backslashes literally.

Add the code and the warning, with a GUC for turning it off the \
parsing so '\'' would be an error.

Breaking old code isn't so bad if it's followed up with a campaign from
the advocacy folks about how to do the job properly, along with a
thorough explanation as to why the change was made (compatibility with
other DBs, SQL Spec, etc.).

It probably won't be any worse than when '' was rejected for an integer
0.

> ---------------------------------------------------------------------------
>
> Christopher Kings-Lynne wrote:
> > > Yep, you probably are.  The hurt is backward compatibility, but the gain
> > > is greater portability with other database systems.
> >
> > It's just going to break millions of PHP scripts :(
> >
> > Chris
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
> >
>
--


pgsql-patches by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: Re: Escape handling in strings
Next
From: Pavel Stehule
Date:
Subject: Re: Escape handling in strings