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