Re: Add Nullif case for eval_const_expressions_mutator

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Add Nullif case for eval_const_expressions_mutator
Дата
Msg-id 883197.1610382053@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Add Nullif case for eval_const_expressions_mutator  ("Hou, Zhijie" <houzj.fnst@cn.fujitsu.com>)
Ответы RE: Add Nullif case for eval_const_expressions_mutator  ("Hou, Zhijie" <houzj.fnst@cn.fujitsu.com>)
Список pgsql-hackers
"Hou, Zhijie" <houzj.fnst@cn.fujitsu.com> writes:
> I notice that there are no Nullif case in eval_const_expression.
> Since Nullif is similar to Opexpr and is easy to implement,
> I try add this case in eval_const_expressions_mutator.

I think this patch should be about a tenth the size.  Try modeling
it on the T_SubscriptingRef-etc case, ie, use ece_generic_processing
and then ece_evaluate_expr to cover the generic cases.  OpExpr is
common enough to deserve specially optimized code, but NullIf isn't,
so shorter is better.

            regards, tom lane



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

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: popcount
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Moving other hex functions to /common