From: PG Doc comments form <noreply@postgresql.org>
To: pgsql-docs@lists.postgresql.org
Cc: matthias01123@gmail.com
Subject: COALESCE could use some better examples
Date: Thu, 13 Oct 2022 14:28:23 +0000
Message-ID: <166567130399.591812.10092275852150047596@wrigleys.postgresql.org> (raw)
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/15/functions-conditional.html
Description:
Regarding:
https://www.postgresql.org/docs/current/functions-conditional.html
I ran into a situation where COALESCE was used like this
```
SELECT * FROM table WHERE COALESCE(col_1, col_2, col_3) >= 5
```
and didn't understand how it worked, and the examples don't really help
because they only use COALESCE like
```
SELECT COALESCE(..)
```
I asked and answered a question on stackoverflow with a pretty good example
of this, you could consider adding to your page.
Thank you :))
Stackoverflow question link:
https://stackoverflow.com/questions/74057319/coalesce-in-postgresql-conditional-displaying-seemingly...
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: noreply@postgresql.org, pgsql-docs@lists.postgresql.org, matthias01123@gmail.com
Subject: Re: COALESCE could use some better examples
In-Reply-To: <166567130399.591812.10092275852150047596@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox