Thread
Commits
-
Doc: clarify data type behavior of COALESCE and NULLIF.
- 24b83a508254 14.0 landed
- f47841fbad8a 13.1 landed
- d4fd571b3e74 12.5 landed
- d4fb509d07c3 9.6.20 landed
- ca0c8ea6662e 10.15 landed
- a24cda29e274 11.10 landed
- 7b9cee45ad2a 9.5.24 landed
-
Addition to content
The Post Office <noreply@postgresql.org> — 2020-11-08T18:31:27Z
The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/13/functions-conditional.html Description: Hello I would be helpful to add that NULLIF and COALESCE need to be of same data type. Thank you
-
Re: Addition to content
Tom Lane <tgl@sss.pgh.pa.us> — 2020-11-09T16:09:59Z
PG Doc comments form <noreply@postgresql.org> writes: > I would be helpful to add that NULLIF and COALESCE need to be of same data > type. That's not actually a correct statement ... which I guess just reinforces your point that the behavior needs to be documented. regards, tom lane
-
Re: Addition to content
Bruce Momjian <bruce@momjian.us> — 2020-11-11T19:32:13Z
On Mon, Nov 9, 2020 at 11:09:59AM -0500, Tom Lane wrote: > PG Doc comments form <noreply@postgresql.org> writes: > > I would be helpful to add that NULLIF and COALESCE need to be of same data > > type. > > That's not actually a correct statement ... which I guess just reinforces > your point that the behavior needs to be documented. FYI, this was done in this commit: commit 24b83a5082 Author: Tom Lane <tgl@sss.pgh.pa.us> Date: Mon Nov 9 12:02:24 2020 -0500 Doc: clarify data type behavior of COALESCE and NULLIF. After studying the code, NULLIF is a lot more subtle than you might have guessed. Discussion: https://postgr.es/m/160486028730.25500.15740897403028593550@wrigleys.postgresql.org -- Bruce Momjian <bruce@momjian.us> https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee