Re: count_nulls(VARIADIC "any") - Mailing list pgsql-hackers

From Shulgin, Oleksandr
Subject Re: count_nulls(VARIADIC "any")
Date
Msg-id CACACo5SBcJnX5bSFOCKCsKvCXR2_vLeLyZk-5+E2=+3H=ae1MA@mail.gmail.com
Whole thread Raw
In response to Re: count_nulls(VARIADIC "any")  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: count_nulls(VARIADIC "any")  (Marko Tiikkaja <marko@joh.to>)
List pgsql-hackers
On Thu, Aug 13, 2015 at 2:19 AM, David G. Johnston <david.g.johnston@gmail.com> wrote:
On Wed, Aug 12, 2015 at 4:11 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Peter Geoghegan <pg@heroku.com> writes:
> On Wed, Aug 12, 2015 at 10:30 AM, Alvaro Herrera
> <alvherre@2ndquadrant.com> wrote:
>> The name count_nulls() suggest an aggregate function to me, though.

> I thought the same.

Ditto.  I'd be fine with this if we can come up with a name that
doesn't sound like an aggregate.  The best I can do offhand is
"number_of_nulls()", which doesn't seem very pretty.


nulls_in(a, b, c) IN (0, 3) - yes the repetition is not great...

How about these:

nulls_rank() (the analogy being 0 <= "rank" <= "set size")
nnulls()

or just

nulls() (this one might be a bit confusing due to existing NULLS LAST/FIRST syntax, though)

--
Alex

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: pg_dump quietly ignore missing tables - is it bug?
Next
From: Marko Tiikkaja
Date:
Subject: Re: count_nulls(VARIADIC "any")