Re: [HACKERS] FE/BE protocol vs. parameterized queries

2006-09-07 Thread Michael Paesold
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

Re: [HACKERS] FE/BE protocol vs. parameterized queries

2006-09-07 Thread Csaba Nagy
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. I definitely want the possibility of getting stable plans. That's only possible if

Re: [HACKERS] FE/BE protocol vs. parameterized queries

2006-09-06 Thread Tom Lane
I wrote: Andrew - Supernews [EMAIL PROTECTED] writes: I believe this could usefully (and transparently to clients) be changed so that Bind on the unnamed statement does _not_ store the plan back in the unnamed statement's context, but instead produces a plan which is only used _for that

[HACKERS] FE/BE protocol vs. parameterized queries

2006-09-04 Thread Andrew - Supernews
Picking out a specific point from the thread on prepared queries: Currently, the handling of Parse/Bind on the unnamed statement seems to go like this: - Parse on the unnamed statement does analysis and rewriting but does not plan, storing the query in a special memory context dedicated to

Re: [HACKERS] FE/BE protocol vs. parameterized queries

2006-09-04 Thread Tom Lane
Andrew - Supernews [EMAIL PROTECTED] writes: I believe this could usefully (and transparently to clients) be changed so that Bind on the unnamed statement does _not_ store the plan back in the unnamed statement's context, but instead produces a plan which is only used _for that specific