I wrote a Perl program wich uses PostgreSQL. This program was running well for months until yesterday, when my SysAdmin upgraded the DBD::Pg module for the current version (1.40).
Now, where I have
Raises 2 errors:my $sql = " LOCK TABLE tabreserves IN SHARE MODE; SELECT tabreserves.date, tabreserves.hour_i, tabreserves.hour_e, tabreserves.idreserve, tabreserves.fk_idfield, tabfields.imped, tabfields.design FROM tabreserves LEFT JOIN tabfields ON tabfields.idfield = tabreserves.fk_idfield WHERE date = ? AND (hour_i < ? AND hour_e > ?) AND (fk_idfield = ? OR ? = ANY (imped)) LIMIT 1 ";
1st
DBD::Pg::st execute failed: ERROR: cannot insert multiple commands in +to a prepared statement
If I delete the first line LOCK TABLE tabreserves IN SHARE MODE;, raises another error.
2nd
DBD::Pg::st execute failed: ERROR: column "hour_i" is of type integer + but expression is of type character varying HINT: You will need to rewrite or cast the expression.
Needless to say that I have _many_ statements wich uses the same structure - e.g. multiple commands in a prepared statement and not casting expressions, since that wasn't mandatory before.
When we (me and the sysadmin) saw the errors we thought: "well... time to upgrade to PostgreSQL 8!". We were using 7.4. We did the upgrade. But the errors persist.
What am I missing here? Do I really need to cast expressions? and why can't I use multiple statements now?
Thanks,
Miguel
In reply to Need help with DBD::Pg by Miguel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |