Re: Handling RestrictInfo in expression_tree_walker

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Handling RestrictInfo in expression_tree_walker
Дата
Msg-id 2695.1565192851@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Handling RestrictInfo in expression_tree_walker  (Konstantin Knizhnik <k.knizhnik@postgrespro.ru>)
Список pgsql-hackers
Konstantin Knizhnik <k.knizhnik@postgrespro.ru> writes:
> Frankly speaking I do not see some good reasons for not handling 
> RestrictInfo in expression_tree_worker. It can really simplify writing 
> of mutators/walkers.

I don't buy this; what seems more likely is that you're trying to apply
an expression tree mutator to something you shouldn't.  The caching
aspects of RestrictInfo, and the fact that the planner often assumes
that RestrictInfos don't get copied (so that pointer equality is a
useful test), are both good reasons to be wary of applying general
mutations to those nodes.

Or in other words, if you want a walker/mutator to descend through
those nodes, you almost certainly need special logic at those nodes
anyway.  Omitting them from the nodeFuncs support guarantees you
don't forget that.

            regards, tom lane



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

Предыдущее
От: Sehrope Sarkuni
Дата:
Сообщение: Re: [Proposal] Table-level Transparent Data Encryption (TDE) and KeyManagement Service (KMS)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: s/rewinded/rewound/?