Re: COALESCE with single argument looks like identity function

2025-04-14 Thread Maksim Milyutin
Updated patchset is attached On 4/14/25 17:25, Maksim Milyutin wrote: On 4/11/25 17:00, Tom Lane wrote: Maksim Milyutin writes: I've noticed that COALESCE function doesn't converge to argument expression if it is alone in argument list of COALESCE as part simplification routine for expression

Re: COALESCE with single argument looks like identity function

2025-04-14 Thread Maksim Milyutin
On 4/11/25 17:00, Tom Lane wrote: Maksim Milyutin writes: I've noticed that COALESCE function doesn't converge to argument expression if it is alone in argument list of COALESCE as part simplification routine for expressions in planner. This might suppress further useful transformations when non

Re: COALESCE with single argument looks like identity function

2025-04-11 Thread Tom Lane
Maksim Milyutin writes: > I've noticed that COALESCE function doesn't converge to argument > expression if it is alone in argument list of COALESCE as part > simplification routine for expressions in planner. This might suppress > further useful transformations when non-strict ops are required

COALESCE with single argument looks like identity function

2025-04-11 Thread Maksim Milyutin
Hello everyone! I've noticed that COALESCE function doesn't converge to argument expression if it is alone in argument list of COALESCE as part simplification routine for expressions in planner. This might suppress further useful transformations when non-strict ops are required from some exp