| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Nicolas Adenis-Lamarre <nicolas(dot)adenis(dot)lamarre(at)gmail(dot)com> |
| Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Convert coalesce to or/and |
| Date: | 2026-01-01 22:51:06 |
| Message-ID: | 4125586.1767307866@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Nicolas Adenis-Lamarre <nicolas(dot)adenis(dot)lamarre(at)gmail(dot)com> writes:
> would it be accepted to do a patch to replace coalesce by and/or,
> mainly to fix related estimations.
Almost certainly not. It'd be very hard to do that while preserving
the expected semantics of COALESCE: no argument is to be evaluated
more than once, and people sometimes expect strict left-to-right
evaluation. I've even seen it used as an intentional optimization
fence.
If you think you can improve the estimation around it, I'd suggest
tackling that directly.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alexander Korotkov | 2026-01-01 23:42:34 | Re: Implement waiting for wal lsn replay: reloaded |
| Previous Message | Nicolas Adenis-Lamarre | 2026-01-01 22:36:00 | Convert coalesce to or/and |