From: David Stanaway <david@stanaway.net>
To: Vlad <marchenko@gmail.com>
Cc: Brandon Metcalf <bmetcalf@nortel.com>
Cc: dbdpg-general@gborg.postgresql.org
Cc: pgsql-interfaces@postgresql.org
Subject: Re: [Dbdpg-general] benchmarking old Pg and DBD::Pg
Date: Fri, 08 Apr 2005 13:44:46 -0500
Message-ID: <1112985886.19084.8.camel@david.dialmex.net> (raw)
In-Reply-To: <cd70c6810504081112694ba268@mail.gmail.com>
References: <Pine.LNX.4.58L.0504081127400.18466@cash.rhiamet.com>
<cd70c6810504081112694ba268@mail.gmail.com>
On Fri, 2005-04-08 at 14:12 -0400, Vlad wrote:
> we've noticed that too here and quick explanation is - with the new
> "prepare" implementation, the query get prepared on the server side,
> which is good; the problem is that all of the bind values passed to
> the sql server during execute call are in form of ***varchar***, i.e.
> even if a field is of int type in postgresql table, DBD::Pg passes
> your bind value as char - as a result, postgresql doesn't use indexes.
A work around would be in the sql to cast the param to the appropriate
type.
EG: SELECT * FROM Person WHERE personid = %::int
--
David Stanaway <david@stanaway.net>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: david@stanaway.net, marchenko@gmail.com, bmetcalf@nortel.com, dbdpg-general@gborg.postgresql.org
Subject: Re: [Dbdpg-general] benchmarking old Pg and DBD::Pg
In-Reply-To: <1112985886.19084.8.camel@david.dialmex.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox