Re: Prepared statements considered harmful

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Lukas Kahwe Smith <smith(at)pooteeweet(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Prepared statements considered harmful
Date: 2006-08-31 17:29:45
Message-ID: 20060831172945.GF27851@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Aug 31, 2006 at 06:34:45PM +0200, Lukas Kahwe Smith wrote:
> BTW: PDO has gotten a switch to force client side placeholder
> replacement in favor of using server side prepared statements due to the
> fact that prepared statements side-step the MySQL query cache.

Perl DBD:Pg also has a switch to force one way or the other.

However (as has been stated already) people are confusing prepared
statements with out-of-line parameters. Even DBI uses the phrase
"prepare" for setting up statements, whereas this doesn't actually
require server-side prepare, all it needs is out-of-line parameters.

I see from the source that DBD::Pg does use PQexecParams() sometimes so
maybe it does support out-of-line parameters...

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Guillaume Smet 2006-08-31 17:33:14 Re: [HACKERS] [PATCHES] log_statement output for protocol
Previous Message Robert Bernier 2006-08-31 17:28:23 Re: Thought provoking piece on NetBSD