count_nulls(VARIADIC "any")
От
Marko Tiikkaja
Тема
count_nulls(VARIADIC "any")
Дата
Msg-id
55CB7FF1.70506@joh.to
Список
Дерево обсуждения
count_nulls(VARIADIC "any") Marko Tiikkaja <marko@joh.to>
Re: count_nulls(VARIADIC "any") Marko Tiikkaja <marko@joh.to>
Re: count_nulls(VARIADIC "any") Tom Lane <tgl@sss.pgh.pa.us>
Re: count_nulls(VARIADIC "any") Marko Tiikkaja <marko@joh.to>
Re: count_nulls(VARIADIC "any") Marko Tiikkaja <marko@joh.to>
Re: count_nulls(VARIADIC "any") Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: count_nulls(VARIADIC "any") Marko Tiikkaja <marko@joh.to>
Re: count_nulls(VARIADIC "any") Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: count_nulls(VARIADIC "any") Marko Tiikkaja <marko@joh.to>
Re: count_nulls(VARIADIC "any") Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: count_nulls(VARIADIC "any") Marko Tiikkaja <marko@joh.to>
Re: count_nulls(VARIADIC "any") Pavel Stehule <pavel.stehule@gmail.com>
Re: count_nulls(VARIADIC "any") Pavel Stehule <pavel.stehule@gmail.com>
Re: count_nulls(VARIADIC "any") Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: count_nulls(VARIADIC "any") Marko Tiikkaja <marko@joh.to>
Re: count_nulls(VARIADIC "any") Pavel Stehule <pavel.stehule@gmail.com>
Re: count_nulls(VARIADIC "any") Pavel Stehule <pavel.stehule@gmail.com>
Re: count_nulls(VARIADIC "any") Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: count_nulls(VARIADIC "any") Pavel Stehule <pavel.stehule@gmail.com>
Re: count_nulls(VARIADIC "any") Marko Tiikkaja <marko@joh.to>
Re: count_nulls(VARIADIC "any") Pavel Stehule <pavel.stehule@gmail.com>
Re: count_nulls(VARIADIC "any") Tom Lane <tgl@sss.pgh.pa.us>
Re: count_nulls(VARIADIC "any") Tom Lane <tgl@sss.pgh.pa.us>
Re: count_nulls(VARIADIC "any") Marko Tiikkaja <marko@joh.to>
Re: count_nulls(VARIADIC "any") Thomas Munro <thomas.munro@enterprisedb.com>
Re: count_nulls(VARIADIC "any") Tom Lane <tgl@sss.pgh.pa.us>
Re: count_nulls(VARIADIC "any") Thomas Munro <thomas.munro@enterprisedb.com>
Re: count_nulls(VARIADIC "any") Pavel Stehule <pavel.stehule@gmail.com>
Re: count_nulls(VARIADIC "any") Pavel Stehule <pavel.stehule@gmail.com>
Re: count_nulls(VARIADIC "any") Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: count_nulls(VARIADIC "any") Pavel Stehule <pavel.stehule@gmail.com>
Re: count_nulls(VARIADIC "any") Pavel Stehule <pavel.stehule@gmail.com>
Re: count_nulls(VARIADIC "any") Greg Stark <stark@mit.edu>
Re: count_nulls(VARIADIC "any") Alvaro Herrera <alvherre@2ndquadrant.com>
Re: count_nulls(VARIADIC "any") Peter Geoghegan <pg@heroku.com>
Re: count_nulls(VARIADIC "any") Tom Lane <tgl@sss.pgh.pa.us>
Re: count_nulls(VARIADIC "any") "David G. Johnston" <david.g.johnston@gmail.com>
Re: count_nulls(VARIADIC "any") "Shulgin, Oleksandr" <oleksandr.shulgin@zalando.de>
Re: count_nulls(VARIADIC "any") Marko Tiikkaja <marko@joh.to>
Re: count_nulls(VARIADIC "any") Pavel Stehule <pavel.stehule@gmail.com>
Re: count_nulls(VARIADIC "any") "Shulgin, Oleksandr" <oleksandr.shulgin@zalando.de>
Re: count_nulls(VARIADIC "any") Pavel Stehule <pavel.stehule@gmail.com>
Re: count_nulls(VARIADIC "any") Atri Sharma <atri.jiit@gmail.com>
Re: count_nulls(VARIADIC "any") Pavel Stehule <pavel.stehule@gmail.com>
Re: count_nulls(VARIADIC "any") Marko Tiikkaja <marko@joh.to>
Re: count_nulls(VARIADIC "any") Pavel Stehule <pavel.stehule@gmail.com>
Re: count_nulls(VARIADIC "any") Marko Tiikkaja <marko@joh.to>
Hi,
I'd like to suggest $SUBJECT for inclusion in Postgres 9.6. I'm sure
everyone would've found it useful at some point in their lives, and the
fact that it can't be properly implemented in any language other than C
I think speaks for the fact that we as a project should provide it.
A quick and dirty proof of concept (patch attached):
=# select count_nulls(null::int, null::text, 17, 'bar');
count_nulls
-------------
2
(1 row)
Its natural habitat would be CHECK constraints, e.g:
CHECK (count_nulls(a,b,c) IN (0, 3))
Will finish this up for the next CF, unless someone wants to tell me how
stupid this idea is before that.
.m
В списке pgsql-hackers по дате отправления
От: Gideon Dresdner
Дата: