Re: Delaying the planning of unnamed statements until Bind

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Delaying the planning of unnamed statements until Bind
Дата
Msg-id 3687.1085190912@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Delaying the planning of unnamed statements until Bind  (Oliver Jowett <oliver@opencloud.com>)
Список pgsql-hackers
Oliver Jowett <oliver@opencloud.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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Oliver Jowett
Дата:
Сообщение: Re: Delaying the planning of unnamed statements until Bind
Следующее
От: Greg Stark
Дата:
Сообщение: Re: Delaying the planning of unnamed statements until Bind