RE: Add Nullif case for eval_const_expressions_mutator

From: "Hou, Zhijie" <houzj(dot)fnst(at)cn(dot)fujitsu(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: RE: Add Nullif case for eval_const_expressions_mutator
Date: 2021-01-12 06:43:09
Message-ID: 4982fac6fc62459bbcf560c6302ecd47@G08CNEXMBPEKD05.g08.fujitsu.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > 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.
>
> Thanks for the review.
>
> Attaching v2 patch , which followed the suggestion to use
> ece_generic_processing and ece_evaluate_expr to simplify the code.
>
> Please have a check.

Sorry, I found the code still be simplified better.
Attaching the new patch.

Best regards,
houzj

Attachment Content-Type Size
v2_1-0001-add-nullif-case-for-eval_const_expressions.patch application/octet-stream 2.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2021-01-12 06:47:20 Fix a typo in SearchCatCache function comment
Previous Message Amit Kapila 2021-01-12 06:38:29 Re: Logical Replication - behavior of ALTER PUBLICATION .. DROP TABLE and ALTER SUBSCRIPTION .. REFRESH PUBLICATION