Re: FE/BE protocol vs. parameterized queries - Mailing list pgsql-hackers

From Michael Paesold
Subject Re: FE/BE protocol vs. parameterized queries
Date
Msg-id 44FFB190.6020909@gmx.at
Whole thread Raw
In response to Re: FE/BE protocol vs. parameterized queries  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: FE/BE protocol vs. parameterized queries  (Csaba Nagy <nagy@ecircle-ag.com>)
List pgsql-hackers
Tom Lane wrote:
> The infrastructure for the former planning method (using the first
> Bind's parameters as sample values for estimation, but not as constants)
> is still there, but it's not being used now.  Does anyone want to argue
> for changing things to plan named statements that way?  I'm of two minds
> about it myself; you can make a good case that it'd usually be a win,
> but it's also not hard to envision scenarios where it'd be a loss.

Although I don't have a clear opinion myself, I sometimes read on this list 
that people are using prepared statements to get safe, stable plans, i.e. 
plans that don't depend on the specific parameter input.

If you change that, I don't think they will be happy at all. I suggest 
leaving it as-is for 8.2. I think the user (i.e. driver) should be able to 
tell the backend, if they want planning for the first bind, or right at 
prepare.

Best Regards
Michael Paesold


pgsql-hackers by date:

Previous
From: Jan de Visser
Date:
Subject: Re: Build date for snapshots?
Next
From: Csaba Nagy
Date:
Subject: Re: FE/BE protocol vs. parameterized queries