Re: Some optimizations for COALESCE expressions during constant folding - Mailing list pgsql-hackers

From Richard Guo
Subject Re: Some optimizations for COALESCE expressions during constant folding
Date
Msg-id CAMbWs4_LE4B4baeF8GxYwxYYc+EhPrPFxV1ryBiSs0XxCOpwCA@mail.gmail.com
Whole thread Raw
In response to Re: Some optimizations for COALESCE expressions during constant folding  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: Some optimizations for COALESCE expressions during constant folding
List pgsql-hackers
On Tue, Nov 25, 2025 at 10:16 PM David Rowley <dgrowleyml@gmail.com> wrote:
> uhh, of course it is. That's what I did in [1] for Consts. Doing it
> this way means we'll not need to modify the constant folding code (or
> whichever other code wants to know when an Expr can't be NULL) every
> time we think of something new that we can prove can't be NULL.

OK.  Here is an updated patch that does that.  (There is some overlap
in changes to expr_is_nonnullable with the patch you mentioned.)

- Richard

Attachment

pgsql-hackers by date:

Previous
From: jian he
Date:
Subject: Re: transformJsonFuncExpr pathspec cache lookup failed
Next
From: Kirill Reshke
Date:
Subject: Re: transformJsonFuncExpr pathspec cache lookup failed