RE: Add Nullif case for eval_const_expressions_mutator
Zhijie Hou (Fujitsu) <houzj.fnst@fujitsu.com>
From: "houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: David Steele <david@pgmasters.net>, Peter Eisentraut <peter.eisentraut@enterprisedb.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-03-24T10:52:04Z
Lists: pgsql-hackers
Attachments
- v4-0001-add-nullif-case-for-eval_const_expressions.patch (application/octet-stream) patch v4-0001
> + if (!has_nonconst_input) > + return ece_evaluate_expr(expr); > > That's not okay without a further check to see if the comparison function used > by the node is immutable. Compare ScalarArrayOpExpr, for instance. Thanks for pointing it out. Attaching new patch with this change. Best regards, houzj
Commits
-
Add support for NullIfExpr in eval_const_expressions
- 9c5f67fd6256 14.0 landed