[Bioperl-l] [BioSQL-l] postgres 8.3 will not cast text to integer any longer

Greg Sabino Mullane greg at turnstep.com
Fri Mar 21 02:41:10 UTC 2008

Hash: RIPEMD160

> Which leads me back to the surprise observation that the parameter
> was bound as an integer in the first place, when DBD::Pg used to bind
> everything as string unless you told it otherwise. Which DBD::Pg
> version is it that you are using? I would suspect (or hope) that
> maybe there is soon an update release of DBD::Pg that fixes this
> problem by going back to binding everything as string by default (and
> as the tests show PostgreSQL will still convert strings to integer if
> necessary).
> Depending on what I (or can someone else update us on this?) find out
> for the DBD::Pg plans, I'll probably start looking into moving the
> parameter binding into the driver adapters. Though it does feel
> pathetic that this is now also not transparent between drivers.

What you are probably looking for is already there, namely:

$dbh->{pg_server_prepare} = 0;

There's good reasons for the casting enforcement in 8.3, although I've
been a sharp critic of the change, and certainly of the suddeness
of it. Another solution to consider is adding the casts back in:

(the March 4th entry)

- --
Greg Sabino Mullane greg at turnstep.com
PGP Key: 0x14964AC8 200803202237


More information about the Bioperl-l mailing list