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

From David Cantrell
Subject Re: Pg.pm oddity with apostrophes
Date
Msg-id 20000826194353.B13133@pigsty.barnyard.co.uk
Whole thread Raw
In response to Pg.pm oddity with apostrophes  (Charles Curley <ccurley@trib.com>)
Responses Re: Pg.pm oddity with apostrophes  (Charles Curley <ccurley@trib.com>)
List pgsql-novice
On Sat, Aug 26, 2000 at 10:42:11AM -0600, Charles Curley wrote:

> I am using pg.pm with perl ...
>
> 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. If I remove the apostrophe, the otherwise identical
> record goes in just fine. I am escaping the apostrophe correctly, as far
> as I know. The insert query is as follows:
>
> Insert into contacts VALUES ( 'Mr.', 'Patrick', 'O\'Neil', blah, blah... 'http://URL' ); "
>
> I can insert the name from psql with no problems, which makes me think it
> is a Pg.pm problem.

Looks more like it's a problem with your understanding of perl.  Can you
post the exact perl code you're using to execute that query?

--
David Cantrell | david@cantrell.org.uk | http://www.cantrell.org.uk/david

      I'm working on the assumption that chicks dig mad scientists

pgsql-novice by date:

Previous
From: Fredrick Bartlett
Date:
Subject: Host problem
Next
From: Neil Conway
Date:
Subject: Re: Host problem