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 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
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
From | Date | Subject | |
---|---|---|---|
Next Message | James Hughes | 1998-03-20 02:17:36 | Re: [HACKERS] VACUUM ANALYZE Problem |
Previous Message | The Hermit Hacker | 1998-03-19 20:14:24 | Re: [HACKERS] tables >2GB |