number of not null arguments

From: Murat Kabilov <kabilovmf(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: number of not null arguments
Date: 2010-11-26 09:33:02
Message-ID: AANLkTim6Smk5BtOBSNK=s6AWiADxbzrYrqon79MC2cof@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

Is there a function which returns number of not null arguments?

SELECT notnull_count(1, 1, NULL, NULL)
notnull_count
---------------
2

SELECT notnull_count(ARRAY[1,2,3], ARRAY[10,20,30], NULL, ARRAY[NULL])
notnull_count
---------------
3

Thanks

--
Murat Kabilov

Responses

Browse pgsql-general by date

  From Date Subject
Next Message A B 2010-11-26 09:39:55 Question about catching exception
Previous Message Leif Jensen 2010-11-26 05:04:13 Help on explain analyze