Skip site navigation (1) Skip section navigation (2)

Re: Backslash handling in strings

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Backslash handling in strings
Date: 2005-05-31 04:20:19
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-patches
Greg Stark wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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                        |
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

pgsql-hackers by date

Next:From: Luke LonerganDate: 2005-05-31 04:38:15
Subject: Re: Consumer-grade vs enterprise-grade disk drives
Previous:From: Bruce MomjianDate: 2005-05-31 04:18:56
Subject: Re: Consumer-grade vs enterprise-grade disk drives

pgsql-patches by date

Next:From: Bruce MomjianDate: 2005-05-31 04:22:53
Subject: Re: numeric precision when raising one numeric to another.
Previous:From: Greg StarkDate: 2005-05-31 04:14:59
Subject: Re: Backslash handling in strings

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group