Re: (non)zero function - Mailing list pgsql-sql

From Christian Kratzer
Subject Re: (non)zero function
Date
Msg-id 20050328104059.A93661@vesihiisi.cksoft.de
Whole thread Raw
In response to (non)zero function  (Enrico Weigelt <weigelt@metux.de>)
List pgsql-sql
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


pgsql-sql by date:

Previous
From: "Chandan_Kumaraiah"
Date:
Subject: connectby queries
Next
From: Alvaro Herrera
Date:
Subject: Re: [HACKERS] Executing Anonymous Blocks