| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Oliver Jowett <oliver(at)opencloud(dot)com> |
| Cc: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: Delaying the planning of unnamed statements until Bind |
| Date: | 2004-05-22 01:55:12 |
| Message-ID: | 3687.1085190912@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Oliver Jowett <oliver(at)opencloud(dot)com> writes:
> Ok, so something like this?
> 1) eval_const_expressions takes a list of parameter values and does
> Param to Const replacement if given parameters.
> 2) The main planner does not pass parameters to eval_const_expressions.
> 3) When the selectivity functions care about a Const vs non-Const value
> and they are dealing with a non-leaf expression node, they call
> eval_const_expressions passing the expression tree & the planner-global
> parameter values, and then look at the result's Const-ness again.
Right.
> There appear to be a few other places where Const vs. Param affects the
> resulting plan (clause_selectivity, LIMIT/OFFSET support, etc). Do the
> same thing there?
clause_selectivity could reasonably do this. Not sure about
LIMIT/OFFSET.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Greg Stark | 2004-05-22 05:56:54 | Re: Delaying the planning of unnamed statements until Bind |
| Previous Message | Oliver Jowett | 2004-05-22 01:49:59 | Re: Delaying the planning of unnamed statements until Bind |