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

Bug in DBD::Pg v0.69?

From: Michael J Schout <mschout(at)mail(dot)gkg-com(dot)com>
To: questions(at)postgresql(dot)org, hackers(at)postgresql(dot)org
Subject: Bug in DBD::Pg v0.69?
Date: 1998-03-19 20:50:08
Message-ID: 199803192050.OAA20065@mail.gkg-com.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Hi.

Im running Postgresql v6.2, perl5.004_04, the latest DBI, and the latest
DBD::Pg (0.69).  I have a script that just executes a query, and tries to
get the results, and it seems that this particular query doesnt work.  Here
is the code that does not work with DBD::Pg.

use strict;
use DBI;

my $dbh = DBI->connect("dbi:Pg:dbname=gkgis");

my $query;
$query  = "SELECT project, user, created, ";
$query .= "       'now'::datetime-datetime(created) AS otime ";
$query .= "FROM   project_todo ";
$query .= "WHERE  openincident='TRUE' ";
$query .= "ORDER BY created";

print "QUERY : $query";
my $sth = $dbh->prepare($query);
my $rc = $sth->execute();


This produces no accessible results!  I know the query is okay because I
can cut and paste teh query (that the script prints) into a psql session
and it dumps out the results.

What makes me think its a bug in DBD is that if I change the above script
to have:

my $query = "SELECT * FROM project_todo";
...

instead of the long query above, it produces results.  So the connection
part is okay (ie access is granted etc).  If I use Pg instead of DBI the
long query works, but I would prefer to use DBI.  Does anyone have any
ideas what would cause this?  Its a quite strange problem, adn I dont know
how to debug DBD::Pg :)

Mike

Responses

pgsql-hackers by date

Next:From: James HughesDate: 1998-03-20 02:17:36
Subject: Re: [HACKERS] VACUUM ANALYZE Problem
Previous:From: The Hermit HackerDate: 1998-03-19 20:14:24
Subject: Re: [HACKERS] tables >2GB

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