Re: coalesce

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Henry Drexler" <alonup8tb(at)gmail(dot)com>,<pgsql-docs(at)postgresql(dot)org>
Subject: Re: coalesce
Date: 2011-09-21 14:33:36
Message-ID: 4E79AF70020000250004150D@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

Henry Drexler <alonup8tb(at)gmail(dot)com> wrote:

> "If the results of the first argument are null, it will return the
> second."

Unless the second is also null, in which case it will return the
third. Unless the third is also null...

The trick is to come up with language which recognizes that there
can be any number of arguments. Personally, I think the existing
language does a good job of that, and is pretty clear.

> so I made this example that makes sense:
>
> COALESCE(column,substitute value)

Perhaps a two-argument example would be helpful, as long as it
doesn't mislead people into thinking the construct is limited to two
arguments.

-Kevin

In response to

  • coalesce at 2011-09-21 12:34:33 from Henry Drexler

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Henry Drexler 2011-09-21 15:50:18 Re: coalesce
Previous Message Peter Eisentraut 2011-09-21 13:58:56 Re: somewhat wrong archive_command example