Re: Escape handling in strings

From: Rod Taylor <pg(at)rbt(dot)ca>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Subject: Re: Escape handling in strings
Date: 2005-06-16 05:08:18
Message-ID: 1118898498.78366.100.camel@home
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers 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(at)postgresql(dot)org
> >
>
--

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-06-16 05:10:24 Re: max_fsm_pages >800k ... ?
Previous Message Christopher Kings-Lynne 2005-06-16 04:59:19 Re: [HACKERS] INHERITS and planning

Browse pgsql-patches by date

  From Date Subject
Next Message Pavel Stehule 2005-06-16 05:32:20 Re: Escape handling in strings
Previous Message Christopher Kings-Lynne 2005-06-16 03:19:46 Re: Escape handling in strings