Re: escape

From: "Jean-Yves F(dot) Barbier" <12ukwn(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: escape
Date: 2010-06-27 14:23:31
Message-ID: 20100627162331.4ff96bfc@anubis.defcon1
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Le 27 Jun 2010 12:08:05 GMT,
Jasen Betts <jasen(at)xnet(dot)co(dot)nz> a écrit :

> On 2010-06-26, Jean-Yves F. Barbier <12ukwn(at)gmail(dot)com> wrote:
> > debian sid
> > pg 8.4.4-1
> >===============
> > Hi list,
> >
> > I read the docs about escaping, but I can't find any other manner to
> > escape than a backslash or to double the single quote:
> > SELECT metaphone('O\'CONNOR') or SELECT metaphone('O''CONNOR')
> >
> > The doc's talking about E, but SELECT metaphone(E'O'CONNOR') fail.
>
> if you use \ as an escape in the string you should use E at the start.
>
> E'O\'CONNOR'

Thanks, Jasen (doc wasn't very clear.)

But I also would like to know if there is another way to escape my string
(and especially if there is a builtin or a manner to do that into PG, to
avoid doing that in the program.)

JY
--
A male mathematician is someone who can count to twenty-one without
unzipping his fly.

In response to

  • Re: escape at 2010-06-27 12:08:05 from Jasen Betts

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Jean-Yves F. Barbier 2010-06-27 14:36:15 view and column rights
Previous Message Jasen Betts 2010-06-27 12:08:05 Re: escape