Re: Prepared statements considered harmful - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: Prepared statements considered harmful
Date
Msg-id 20060831191432.GL27851@svana.org
Whole thread Raw
In response to Re: Prepared statements considered harmful  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Prepared statements considered harmful
List pgsql-hackers
On Thu, Aug 31, 2006 at 02:58:48PM -0400, Tom Lane wrote:
> The protocol does let you use OOL parameters without retaining a
> prepared plan, thanks to the hack introduced later to not plan the
> unnamed statement at Parse time, but that's definitely a bit of a wart
> on the original protocol design.  Maybe it's good enough, or maybe not.

Urk, so it was a hack. Unfortunatly it seems something you can't really
change without changing the protocol.

So what are the options now? A GUC like so:

prepare_means_plan = [true|false]

So then a prepare will always parse straightaway, but you can choose
whether or not you want to plan straightaway or at bind time.

Would this be acceptable?

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

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Prepared statements considered harmful
Next
From: Martijn van Oosterhout
Date:
Subject: Re: Prepared statements considered harmful