pg.ddx.io pgsql-docs@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Bruce Momjian <bruce@momjian.us>
To: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Henry Drexler <alonup8tb@gmail.com>
Cc: Kevin Grittner <kevin.grittner@wicourts.gov>
Cc: Pg Docs <pgsql-docs@postgresql.org>
Subject: Re: coalesce
Date: Tue, 4 Oct 2011 21:47:15 -0400 (EDT)
Message-ID: <201110050147.p951lG908071@momjian.us> (raw )
In-Reply-To: <1316623022-sup-9692@alvh.no-ip.org >
Alvaro Herrera wrote:
>
> Excerpts from Henry Drexler's message of mié sep 21 12:50:18 -0300 2011:
> > thanks,
> >
> > so I take it I am not getting those more complex examples (that are
> > apparently beyond my use case), I will take a look at them again.
>
> Maybe the fix is just to add a simpler example, without altering the
> wording (which seems pretty clear to me as well, but then I already know
> what COALESCE does).
Here is a doc patch that at least explains the example. Applied.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
Attachments:
/rtmp/coalesce (text/x-diff, 532B) download
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
new file mode 100644
index 0b6a109..2f307c2
*** a/doc/src/sgml/func.sgml
--- b/doc/src/sgml/func.sgml
*************** SELECT ... WHERE CASE WHEN x <> 0
*** 10015,10020 ****
--- 10015,10022 ----
<programlisting>
SELECT COALESCE(description, short_description, '(none)') ...
</programlisting>
+ This returns <varname>description</> if it is not null, or
+ <varname>short_description</> if it is not null, or <literal>(none)</>.
</para>
<para>
view thread (9+ messages) latest in thread
Message-ID: <201110050147.p951lG908071@momjian.us>
Permalink: ../201110050147.p951lG908071@momjian.us/
Also on: postgresql.org/message-id/201110050147.p951lG908071@momjian.us
copy link · copy postgr.es · copy git am
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: bruce@momjian.us, alvherre@commandprompt.com, alonup8tb@gmail.com, kevin.grittner@wicourts.gov
Subject: Re: coalesce
In-Reply-To: <201110050147.p951lG908071@momjian.us>
* 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