Re: Escaping special characters - Mailing list pgsql-general

From Sam Mason
Subject Re: Escaping special characters
Date
Msg-id 20090317123648.GA32672@frubble.xen.chris-lamb.co.uk
Whole thread Raw
In response to Escaping special characters  (Neanderthelle Jones <elle@view.net.au>)
Responses Re: Escaping special characters
List pgsql-general
On Tue, Mar 17, 2009 at 10:35:20PM +1030, Neanderthelle Jones wrote:
> About the string "Smith \& Jones".
>
> According to the documentation,
>
> INSERT INTO thing (name) VALUES ('Smith E'\\'& Jones');
>
> must work.  But it doesn't.

You're putting things in the wrong places!  The "E" says that the
following literal is using C style escaping.  I.e. you want to say:

  E'Smith \\& Jones'

Hope that helps!

--
  Sam  http://samason.me.uk/

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Escaping special characters
Next
From: Thom Brown
Date:
Subject: Re: Escaping special characters