Re: [Dbdpg-general] benchmarking old Pg and DBD::Pg - Mailing list pgsql-interfaces

From Brandon Metcalf
Subject Re: [Dbdpg-general] benchmarking old Pg and DBD::Pg
Date
Msg-id Pine.LNX.4.58L.0504081316270.18466@cash.rhiamet.com
Whole thread Raw
In response to Re: [Dbdpg-general] benchmarking old Pg and DBD::Pg  (Vlad <marchenko@gmail.com>)
List pgsql-interfaces
m == marchenko@gmail.com writes:
m> we've noticed that too here and quick explanation is - with the newm> "prepare" implementation, the query get
preparedon the server side,m> which is good; the problem is that all of the bind values passed tom> the sql server
duringexecute call are in form of ***varchar***, i.e.m> even if a field is of int type in postgresql table, DBD::Pg
passesm>your bind value as char - as a result, postgresql doesn't use indexes.
 
m> I don't know if developers of new DBD::Pg have some game plan to fixm> this problem... but it won't be easy: since
perlis a no-var-typem> language, so either DBD::Pg needs to analyze the table columns datam> types first before
executinga query and then use correct type form> bind values, or let coder pass those types explicitly... though I'mm>
notaware of a method in DBI that would let them do that...
 


Wouldn't bind_param() do just that?


-- 
Brandon


pgsql-interfaces by date:

Previous
From: "Brandon Metcalf"
Date:
Subject: Re: [Dbdpg-general] benchmarking old Pg and DBD::Pg
Next
From: "Brandon Metcalf"
Date:
Subject: Re: [Dbdpg-general] benchmarking old Pg and DBD::Pg