Re: COALESCE with single argument looks like identity function - Mailing list pgsql-hackers

From Tom Lane
Subject Re: COALESCE with single argument looks like identity function
Date
Msg-id 121284.1751579142@sss.pgh.pa.us
Whole thread Raw
In response to Re: COALESCE with single argument looks like identity function  (Maksim Milyutin <maksim.milyutin@tantorlabs.ru>)
List pgsql-hackers
Maksim Milyutin <maksim.milyutin@tantorlabs.ru> writes:
> Updated patchset is attached

Pushed with minor adjustments.  Mainly, I didn't entirely trust
your substitutions of, eg, "COALESCE(q1)" to "COALESCE(q1, 0)".
That would produce a different result if q1 were NULL.  I'm not
sure that that actually occurs in these regression tests, or
that it would affect the intent of the tests anyway.  But we can
avoid having to think hard about that question by instead writing
"COALESCE(q1, q1)" and so on.  That does provably give the same
result as before.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Cross-type index comparison support in contrib/btree_gin
Next
From: Fujii Masao
Date:
Subject: Re: Speedup truncations of temporary relation forks