pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Henry Drexler <alonup8tb@gmail.com>
To: pgsql-docs@postgresql.org
Subject: Re: coalesce
Date: Wed, 21 Sep 2011 09:33:36 -0500
Message-ID: <4E79AF70020000250004150D@gw.wicourts.gov> (raw)
In-Reply-To: <CAAtgU9RMNVZEQWZNOuvrnHYVcjHAoi6_kgw0ZZcMDPvm9EndQg@mail.gmail.com>
References: <CAAtgU9RMNVZEQWZNOuvrnHYVcjHAoi6_kgw0ZZcMDPvm9EndQg@mail.gmail.com>

Henry Drexler <alonup8tb@gmail.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



view thread (9+ messages)  latest in thread

Message-ID: <4E79AF70020000250004150D@gw.wicourts.gov>
Permalink:  ../4E79AF70020000250004150D@gw.wicourts.gov/
Also on:    postgresql.org/message-id/4E79AF70020000250004150D@gw.wicourts.gov

 · 

reply

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: Kevin.Grittner@wicourts.gov, alonup8tb@gmail.com
  Subject: Re: coalesce
  In-Reply-To: <4E79AF70020000250004150D@gw.wicourts.gov>

* 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