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

From Martijn van Oosterhout
Subject Re: Prepared statements considered harmful
Date
Msg-id 20060901064242.GC12644@svana.org
Whole thread Raw
In response to Re: Prepared statements considered harmful  (Gregory Stark <gsstark@mit.edu>)
Responses Re: Prepared statements considered harmful  (Lukas Kahwe Smith <smith@pooteeweet.org>)
Re: Prepared statements considered harmful  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, Aug 31, 2006 at 07:04:07PM -0400, Gregory Stark wrote:
> The server has to prepare the query sometime. The v3 protocol just gives you
> control over when that happens, but it doesn't force you to do it at any
> particular time.

Not really. All named prepares are planned straight away, all unnamed
ones are planned at bind time. Therefore you cannot have more than one
parsed-but-not-planned prepared query at a time. In a connection pool
scenario there's no way to share such plans since you can't tell which
query has been prepared. That's not forcing, but it's an asymmetry we
could do with out.

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: Roadmaps 'n all that
Next
From: Lukas Kahwe Smith
Date:
Subject: Re: Prepared statements considered harmful