Help with DBD::Pg
From: Santinho (ms_at_simplicidade.com)
Date: 02/23/05
- Next message: John Bokma: "Re: Compare huge XML Files"
- Previous message: H. Wade Minter: "Perlish way to report module errors?"
- Next in thread: Terrence Brannon: "Re: Help with DBD::Pg"
- Reply: Terrence Brannon: "Re: Help with DBD::Pg"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 23 Feb 2005 17:17:48 +0000
Greetings,
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
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
";
Raises 2 errors:
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
- Next message: John Bokma: "Re: Compare huge XML Files"
- Previous message: H. Wade Minter: "Perlish way to report module errors?"
- Next in thread: Terrence Brannon: "Re: Help with DBD::Pg"
- Reply: Terrence Brannon: "Re: Help with DBD::Pg"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|