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

Hilmar Lapp hlapp at gmx.net
Fri Mar 21 12:52:39 UTC 2008


Hi Greg - thanks for your email, it's very helpful.

On Mar 20, 2008, at 10:41 PM, Greg Sabino Mullane wrote:
>>
>> 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;

So disabling server-side prepares will leave values quoted? Having  
server-side prepares would be very useful though, especially for  
Bioperl-db with its many lookup queries that all use similar  
parameter values.

>
> There's good reasons for the casting enforcement in 8.3

I do understand that, but it's also a sharp contrast to other RDBMSs  
that doesn't it make it easier for people to choose Pg when they  
should, and doesn't help writing cross-platform database applications  
either.

> 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:
>
> http://people.planetpostgresql.org/peter/index.php?/archives/ 
> 2008/03.html
> (the March 4th entry)


Thanks for this, that helps a lot.

Do you have links to some of the key threads showing what rationale  
went into the decision? (Or should I just search for your name?) I'd  
like to read up on that first before pouring more oil into the fire.  
I suspect that many of those who made the decision are never faced  
with needing to write cross-RDBMS code.

Also, I wonder why this wasn't made a configurable option so it can  
be disabled by a simple config file change (such as the move away  
from automatic OID columns). But obviously this is the wrong list for  
discussing this (though Bioperl-db *is* one of those pieces of  
software that must be cross-RDBMS).

	-hilmar
-- 
===========================================================
: Hilmar Lapp  -:-  Durham, NC  -:-  hlapp at gmx dot net :
===========================================================






More information about the Bioperl-l mailing list