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: Pine.LNX.4.44.0212191458030.16486-100000@visor.corp.nextbus.com (view raw or flat)
Thread:
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";
}

returns:
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?

Thanks,

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


Responses

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-2014 The PostgreSQL Global Development Group