Thread

  1. Re: Pg.pm oddity with apostrophes

    Webb Sprague <wsprague100@yahoo.com> — 2000-08-26T17:33:19Z

    I haven't messed to much with it, but I think that if
    you use two apostrophes like '', that may work to
    escape it.
    
    --- Charles Curley <ccurley@trib.com> wrote:
    > I am using pg.pm with perl to interface between a
    > web server,
    > Apache, and postgres. Pg.pm is as follows:
    > 
    >
    #-------------------------------------------------------
    > #
    > # $Id: Pg.pm,v 1.8 1998/09/27 19:12:22 mergl Exp $
    > #
    > # Copyright (c) 1997, 1998  Edmund Mergl
    > #
    >
    #-------------------------------------------------------
    > 
    > 
    > [PostgreSQL 6.5.1 on i686-pc-linux-gnu, compiled by
    > gcc pgcc-2.91.66]
    > 
    > 
    > 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.
    > 
    > -- 
    > 
    > 		-- 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 part 2 application/pgp-signature 
    
    
    
    __________________________________________________
    Do You Yahoo!?
    Yahoo! Mail - Free email you can access from anywhere!
    http://mail.yahoo.com/
    
    
  2. Re: Pg.pm oddity with apostrophes

    Charles Curley <ccurley@trib.com> — 2000-08-27T01:25:45Z

    On Sat, Aug 26, 2000 at 10:33:19AM -0700, Webb Sprague wrote:
    > I haven't messed to much with it, but I think that if
    > you use two apostrophes like '', that may work to
    > escape it.
    
    Thanks. That did not solve the problem.
    
    
    > 
    > --- Charles Curley <ccurley@trib.com> wrote:
    > > I am using pg.pm with perl to interface between a
    > > web server,
    > > Apache, and postgres. Pg.pm is as follows:
    > > 
    > >
    > #-------------------------------------------------------
    > > #
    > > # $Id: Pg.pm,v 1.8 1998/09/27 19:12:22 mergl Exp $
    > > #
    > > # Copyright (c) 1997, 1998  Edmund Mergl
    > > #
    > >
    > #-------------------------------------------------------
    > > 
    > > 
    > > [PostgreSQL 6.5.1 on i686-pc-linux-gnu, compiled by
    > > gcc pgcc-2.91.66]
    > > 
    > > 
    > > 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.
    > > 
    > > -- 
    > > 
    > > 		-- 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 part 2 application/pgp-signature 
    > 
    > 
    > 
    > __________________________________________________
    > Do You Yahoo!?
    > Yahoo! Mail - Free email you can access from anywhere!
    > http://mail.yahoo.com/
    
    -- 
    
    		-- 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