From: | Henry Drexler <alonup8tb(at)gmail(dot)com> |
---|---|
To: | pgsql-docs(at)postgresql(dot)org |
Subject: | coalesce |
Date: | 2011-09-21 12:34:33 |
Message-ID: | CAAtgU9RMNVZEQWZNOuvrnHYVcjHAoi6_kgw0ZZcMDPvm9EndQg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
http://www.postgresql.org/docs/9.1/static/functions-conditional.html
states: "The COALESCE function returns the first of its arguments that is
not null. Null is returned only if all arguments are null."
I was having a terrible time understanding this, and looking at the two
examples were just as confusing I could not get it to work right.
not sure if others have had the same difficulty, but here are my suggested
adjustments:
Then on someones website this made perfect sense to me:
" If the results of the first argument are null, it will return the
second."
so I made this example that makes sense:
COALESCE(column,substitute value)
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2011-09-21 13:58:56 | Re: somewhat wrong archive_command example |
Previous Message | Stefan Wolf | 2011-09-21 11:52:38 | Documentation 9.1 - can't be searched |