Skip site navigation (1) Skip section navigation (2)

Pg (Perl for Postgresql)

From: Laurette Cisneros <laurette(at)nextbus(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Pg (Perl for Postgresql)
Date: 2002-12-19 23:01:36
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
Does this belong on this list?

Using Pg, it seems I get an error when trying to query a 7.3 database:

$fromconn = Pg::connectdb( "host=testhost port=5439 dbname=test-73"
    die $fromconn->errorMessage unless ($fromconn->status eq PGRES_CONNECTION_OK);
$query = "select x, y from table1;";
$result = $fromconn->exec( $query );
$status = $result->resultStatus;
if ( $status ne PGRES_TUPLES_OK ) {
   print "query failed: ";
   print $status;
   print "\n$query\n";
   print "\n";

query failed: 7
select x, y from table1;

Is there a newer version of Pg that should be used that can read both 7.2
and 7.3 databases?


Laurette Cisneros
The Database Group
(510) 420-3137
NextBus Information Systems, Inc.
Life is an SQL old chum...


pgsql-interfaces by date

Next:From: Tom LaneDate: 2002-12-19 23:14:25
Subject: Re: Pg (Perl for Postgresql)
Previous:From: Martin ZeiserDate: 2002-12-18 14:08:41
Subject: postgres <=> labview?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group