RE: Add Nullif case for eval_const_expressions_mutator - Mailing list pgsql-hackers

From Hou, Zhijie
Subject RE: Add Nullif case for eval_const_expressions_mutator
Date
Msg-id ed9fb4e7024f4144b920cddc19c07de8@G08CNEXMBPEKD05.g08.fujitsu.local
Whole thread Raw
In response to Re: Add Nullif case for eval_const_expressions_mutator  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses RE: Add Nullif case for eval_const_expressions_mutator  ("Hou, Zhijie" <houzj.fnst@cn.fujitsu.com>)
List pgsql-hackers
> > 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.

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.

Best regards,
houzj




Attachment

pgsql-hackers by date:

Previous
From: japin
Date:
Subject: Re: Logical Replication - behavior of ALTER PUBLICATION .. DROP TABLE and ALTER SUBSCRIPTION .. REFRESH PUBLICATION
Next
From: Peter Geoghegan
Date:
Subject: Re: Deleting older versions in unique indexes to avoid page splits