Re: Pg.pm oddity with apostrophes - Mailing list pgsql-novice

From Charles Curley
Subject Re: Pg.pm oddity with apostrophes
Date
Msg-id 20000826192853.B28579@trib.com
Whole thread Raw
In response to Re: Pg.pm oddity with apostrophes  ("Anthony E . Greene" <agreene@pobox.com>)
List pgsql-novice
On Sat, Aug 26, 2000 at 08:33:53PM -0400, Anthony E . Greene wrote:
> On 26 Aug 2000 12:42 Charles Curley wrote:
> >The oddity I have hit is that if I try to inset a name with an apostrophe
> >in it (e.g. O'Neil), pgsql belly-aches and returns an error of 7. The
> >record is not inserted.
>
> Perl will escape the apostrophe and will not pass the backslash on to the
> backend. You will need to use a double backslash:
>
> $sql = "INSERT INTO contacts VALUES ('Mr.','Patrick','O\\'Neil','http://URL')";

Thanks. That also did not work.


--

        -- C^2

No windows were crashed in the making of this email.

Looking for fine software and/or web pages?
http://w3.trib.com/~ccurley
Attachment

pgsql-novice by date:

Previous
From: "Anthony E . Greene"
Date:
Subject: Re: Pg.pm oddity with apostrophes
Next
From: Charles Curley
Date:
Subject: Re: Pg.pm oddity with apostrophes