pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christian Kratzer <ck-lists@cksoft.de>
To: Enrico Weigelt <weigelt@metux.de>
Cc: pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: (non)zero function
Date: Mon, 28 Mar 2005 10:42:51 +0200 (CEST)
Message-ID: <20050328104059.A93661@vesihiisi.cksoft.de> (raw)
In-Reply-To: <20050327155807.GB16122@nibiru.borg.metux.de>
References: <20050327155807.GB16122@nibiru.borg.metux.de>

Hi,

On Sun, 27 Mar 2005, Enrico Weigelt wrote:

>
> Hi folks,
>
>
> is there an function returning true if the argument is null or
> zero (just to make some queries more concise). Of course its
> trivial to implement as SQL function, but if postgresql already
> provides such a function, I would prefer using it.

Lookup the documentation on COALESCE()

http://www.postgresql.org/docs/current/static/functions-conditional.html
9.13.2. COALESCE

Greetings
Christian

-- 
Christian Kratzer                       ck@cksoft.de
CK Software GmbH                        http://www.cksoft.de/
Phone: +49 7452 889 135                 Fax: +49 7452 889 136



view thread (3+ messages)

Message-ID: <20050328104059.A93661@vesihiisi.cksoft.de>
Permalink:  ../20050328104059.A93661@vesihiisi.cksoft.de/
Also on:    postgresql.org/message-id/20050328104059.A93661@vesihiisi.cksoft.de

 · 

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-sql@postgresql.org
  Cc: ck-lists@cksoft.de, weigelt@metux.de
  Subject: Re: (non)zero function
  In-Reply-To: <20050328104059.A93661@vesihiisi.cksoft.de>

* 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