Re: Add Nullif case for eval_const_expressions_mutator

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Steele <david(at)pgmasters(dot)net>
Cc: "Hou, Zhijie" <houzj(dot)fnst(at)cn(dot)fujitsu(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add Nullif case for eval_const_expressions_mutator
Date: 2021-03-23 15:45:37
Message-ID: 888621.1616514337@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

David Steele <david(at)pgmasters(dot)net> writes:
> Peter, thoughts on the new patch in [1]?

I'm not Peter, but I have a complaint about this bit:

+ 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.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2021-03-23 16:20:11 Re: Nicer error when connecting to standby with hot_standby=off
Previous Message Andrew Dunstan 2021-03-23 15:40:24 Re: multi-install PostgresNode