Re: Escaping special characters

From: Sam Mason <sam(at)samason(dot)me(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Escaping special characters
Date: 2009-03-17 12:36:48
Message-ID: 20090317123648.GA32672@frubble.xen.chris-lamb.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thom Brown 2009-03-17 12:39:50 Re: Escaping special characters
Previous Message Thom Brown 2009-03-17 12:31:36 Re: Escaping special characters