Skip Menu |

This queue is for tickets about the DBD-Pg CPAN distribution.

Report information
The Basics
Id: 12012
Status: resolved
Priority: 0/
Queue: DBD-Pg

People
Owner: Nobody in particular
Requestors: karmak [...] karmak.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.40
Fixed in: 1.41



Subject: More 1.40 application breakage
Here is some code that worked as recently as 1.32, but generates multiple errors in 1.40: $sql = "INSERT INTO ${table} (name,id) VALUES (?,?);"; $sql .= "SELECT last_value FROM ${table}_eid_seq;"; $dbq = $dbh->prepare(${sql}); $dbq->execute(values %data); ( $eid ) = $dbq->fetchrow(); $dbq->finish(); [Note: %data looks like: name => "Sam", id => "35"] First there is this error: ERROR: cannot insert multiple commands into a prepared statement If I split the INSERT and the SELECT and make two separate dbh->execute() calls, then it fixes this error. But then a second error is hit: ERROR: column "id" is of type integer but expression is of type character varying As it happens, I just recently upgraded from DBD-Pg/1.13 to 1.40, which is when I started noticing these errors all over the place. I downgraded from 1.40 to 1.32 and everything started working again, so I'm guessing everything from 1.13 through 1.32 would work fine, and some big changes were made in 1.40 that are incompatable with the application I'm running.
I forgot to mention that I am running Postgresql 7.4.7.
From: David Wheeler <david [...] justatheory.com>
Subject: Re: [cpan #12012] More 1.40 application breakage
Date: Sat, 26 Mar 2005 11:39:16 -0800
To: bug-DBD-Pg [...] rt.cpan.org
RT-Send-Cc:
On Mar 26, 2005, at 8:42 AM, Guest via RT wrote: Show quoted text
> ERROR: column "id" is of type integer but expression is of type > character varying
I believe that it has been fixed for 8.0.1, as well. Care to test it out? See the "Note" here: http://gborg.postgresql.org/project/dbdpg/projdisplay.php Regards, David
From: Ivan Kohler
Please let us know if this is fixed in 1.40_1: http://search.cpan.org/~dbdpg/DBD-Pg-1.40_1/ or direct link to a download: http://search.cpan.org/CPAN/authors/id/D/DB/DBDPG/DBD-Pg-1.40_1.tar.gz Thanks! [guest - Sat Mar 26 11:42:51 2005]: Show quoted text
> Here is some code that worked as recently as 1.32, but generates > multiple errors in 1.40: > > $sql = "INSERT INTO ${table} (name,id) VALUES (?,?);"; > $sql .= "SELECT last_value FROM ${table}_eid_seq;"; > $dbq = $dbh->prepare(${sql}); > $dbq->execute(values %data); > ( $eid ) = $dbq->fetchrow(); > $dbq->finish(); > > [Note: %data looks like: name => "Sam", id => "35"] > > First there is this error: > > ERROR: cannot insert multiple commands into a prepared statement > > If I split the INSERT and the SELECT and make two separate dbh-
> >execute() calls, then it fixes this error. But then a second
error Show quoted text
> is hit: > > ERROR: column "id" is of type integer but expression is of type > character varying > > As it happens, I just recently upgraded from DBD-Pg/1.13 to 1.40, > which is when I started noticing these errors all over the place.
I Show quoted text
> downgraded from 1.40 to 1.32 and everything started working
again, Show quoted text
> so I'm guessing everything from 1.13 through 1.32 would work
fine, Show quoted text
> and some big changes were made in 1.40 that are incompatable with > the application I'm running. >
The CVS version that David pointed to above seemed to fix the problems.