Re: Avoiding bad prepared-statement plans. - Mailing list pgsql-hackers

From Pierre C
Subject Re: Avoiding bad prepared-statement plans.
Date
Msg-id op.u8b0wnhteorkce@localhost
Whole thread Raw
In response to Re: Avoiding bad prepared-statement plans.  (Dimitri Fontaine <dfontaine@hi-media.com>)
Responses Re: Avoiding bad prepared-statement plans.
List pgsql-hackers
On Thu, 18 Feb 2010 16:09:42 +0100, Dimitri Fontaine  
<dfontaine@hi-media.com> wrote:

> "Pierre C" <lists@peufeu.com> writes:
>> Problem with prepared statements is they're a chore to use in web apps,
>> especially PHP, since after grabbing a connection from the pool, you  
>> don't
>> know if it has prepared plans in it or not.
>
> Have you met preprepare yet?
>
>   http://preprepare.projects.postgresql.org/README.html
>   http://packages.debian.org/source/sid/preprepare
>
> Regards,

Hey, this thing is nice.
How hard would it be to put a hook in pg so that, instead of raising an  
error and cancelling the txn when EXECUTing a statement that is not  
prepared, it would call a user function (of the user's choice) which  
would, if possible, prepare said statement, or if not, raise the error ?


pgsql-hackers by date:

Previous
From: Dimitri Fontaine
Date:
Subject: Re: remove contrib/xml2
Next
From: Dimitri Fontaine
Date:
Subject: Re: Avoiding bad prepared-statement plans.