Re: Pg.pm oddity with apostrophes

From: David Cantrell <david(at)cantrell(dot)org(dot)uk>
To: Charles Curley <ccurley(at)trib(dot)com>, pgsql-novice(at)postgreSQL(dot)org
Subject: Re: Pg.pm oddity with apostrophes
Date: 2000-08-26 18:43:56
Message-ID: 20000826194353.B13133@pigsty.barnyard.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)cantrell(dot)org(dot)uk | http://www.cantrell.org.uk/david

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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Fredrick Bartlett 2000-08-26 18:56:15 Host problem
Previous Message David Cantrell 2000-08-26 18:41:31 Re: Simple question