Re: Delaying the planning of unnamed statements until Bind
В списке pgsql-hackers по дате отправления:
| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера