Re: Add Nullif case for eval_const_expressions_mutator

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: David Steele <david(at)pgmasters(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add Nullif case for eval_const_expressions_mutator
Date: 2021-03-30 09:20:04
Message-ID: 6fceea45-8ce5-db49-d490-285a991b84a9@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 24.03.21 11:52, houzj(dot)fnst(at)fujitsu(dot)com wrote:
>> + 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.

This patch looks okay to me and addresses all the feedback that was
given. If there are no more comments, I'll commit it in a few days.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joel Jacobson 2021-03-30 09:21:57 Re: Idea: Avoid JOINs by using path expressions to follow FKs
Previous Message Amit Kapila 2021-03-30 09:14:00 Re: Use consistent terminology for tablesync slots.