Re: sql standard: \' or ''

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: CSN <cool_screen_name90001(at)yahoo(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: sql standard: \' or ''
Date: 2004-05-05 22:28:59
Message-ID: Pine.LNX.4.33.0405051628390.3364-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 5 May 2004, CSN wrote:

>
> --- Gregory Wood <gwood(at)ewebengine(dot)com> wrote:
> > CSN wrote:
> > > I heard that the sql standard for escaping quotes
> > is
> > > '', and not \'. Is this true?
> > >
> > > BTW, PHP's pg_escape_string returns \' and not ''.
> >
> > Are you sure about that?
> >
> > ~# php -r "print pg_escape_string(\"I can't believe
> > that quotes are
> > escaped improperly\n\");"
> > I can''t believe that quotes are escaped improperly
> >
> > Greg
>
> Weird. Via cgi it escapes them as \' and via cli as
> '', for me anyway.

Maybe their different versions? an older one that uses \' and a newer one
that uses ''?

Just a guess.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jim Crate 2004-05-05 22:50:50 Error linking libpq into client program
Previous Message Bill Moran 2004-05-05 22:24:15 Re: sql standard: \' or ''