Re: why partition pruning doesn't work?

Поиск
Список
Период
Сортировка
От Dmitry Dolgov
Тема Re: why partition pruning doesn't work?
Дата
Msg-id CA+q6zcVL=7as7ud5ZNgndH_ytUn-h1=q_v8Cqpfea4-LULweMw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: why partition pruning doesn't work?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: why partition pruning doesn't work?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
> On 1 June 2018 at 17:53, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Ashutosh Bapat <ashutosh.bapat@enterprisedb.com> writes:
>> I think the patch is right if we were to handle only SQLValueFunction,
>> but the bigger picture here is that we aren't evaluating stable
>> functions before run-time partition pruning happens.
>
> I agree though that it seems strange to special-case SQLValueFunction
> rather than any-stable-expression.  As long as the evaluation happens
> at executor start (i.e. with the query's run-time snapshot) it should
> be reasonable to simplify any stable expression.

Just to clarify for myself, for evaluating any stable function here would it be
enough to handle all function-like expressions (FuncExpr / OpExpr /
DistinctExpr / NullIfExpr) and check a corresponding function for provolatile,
like in the attached patch?

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: pg_config.h.win32 missing a set of flags from pg_config.h.inadded in v11 development
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: csv format for psql