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.