Re: Backslash handling in strings - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Backslash handling in strings
Date
Msg-id 200505310420.j4V4KJf23222@candle.pha.pa.us
Whole thread Raw
In response to Re: Backslash handling in strings  (Greg Stark <gsstark@mit.edu>)
List pgsql-hackers
Greg Stark wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> 
> > The goal, at some point, is that we would have two types of strings, ''
> > strings and E'' strings.  '' strings don't have any special backslash
> > handling for compatibility with with the ANSI spec and all other
> > databases except MySQL (and in MySQL it is now optional).  E'' strings
> > behave just like our strings do now, with backslash handling.
> 
> 
> The only thing I'm not clear on is what exactly is the use case for E''
> strings. That is, who do you expect to actually use them?
> 
> Any new applications are recommended to be using '' strings. And any existing
> applications obviously won't be using them since they don't currently exist.

We are saying to use '' to escape single quotes in all strings.  E'' is
still useful if you want to use backslash escapes in your strings.

Does that answer your questions?

--  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: Bruce Momjian
Date:
Subject: Re: Consumer-grade vs enterprise-grade disk drives
Next
From: "Luke Lonergan"
Date:
Subject: Re: Consumer-grade vs enterprise-grade disk drives