Re: distribute_restrictinfo_to_rels if restrictinfo contains volatile functions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: distribute_restrictinfo_to_rels if restrictinfo contains volatile functions
Дата
Msg-id 2056767.1594390246@sss.pgh.pa.us
обсуждение исходный текст
Ответ на distribute_restrictinfo_to_rels if restrictinfo contains volatile functions  (Zhenghua Lyu <zlyu@vmware.com>)
Ответы Re: distribute_restrictinfo_to_rels if restrictinfo contains volatile functions  (Zhenghua Lyu <zlyu@vmware.com>)
Список pgsql-hackers
Zhenghua Lyu <zlyu@vmware.com> writes:
>         The where clause is "pushed down to the x,y" because it only references these two relations.

Yeah.  I agree that it's somewhat unprincipled, but changing it doesn't
seem like a great idea.  There are a lot of users out there who aren't
terribly careful about marking their UDFs as non-volatile, but would be
unhappy if the optimizer suddenly crippled their queries because of
being picky about this.

Also, we specifically document that order of evaluation in WHERE clauses
is not guaranteed, so I feel no need to make promises about how often
volatile functions there will be evaluated.  (Volatiles in SELECT lists
are a different story.)

This behavior has stood for a couple of decades with few user complaints,
so why are you concerned about changing it?

            regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Implement UNLOGGED clause for COPY FROM
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: Default setting for enable_hashagg_disk