diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2016-02-04 23:03:10 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2016-02-04 23:03:37 -0500 |
commit | 6819514fca22f8554edcab6e4d0402b0221f03bb (patch) | |
tree | e78c772e621f3f83804d76d024fdbdf80943a7de /src/backend/executor/nodeHash.c | |
parent | d0cd7bda97a626049aa7d247374909c52399c413 (diff) | |
download | postgresql-6819514fca22f8554edcab6e4d0402b0221f03bb.tar.gz postgresql-6819514fca22f8554edcab6e4d0402b0221f03bb.zip |
Add num_nulls() and num_nonnulls() to count NULL arguments.
An example use-case is "CHECK(num_nonnulls(a,b,c) = 1)" to assert that
exactly one of a,b,c isn't NULL. The functions are variadic, so they
can also be pressed into service to count the number of null or nonnull
elements in an array.
Marko Tiikkaja, reviewed by Pavel Stehule
Diffstat (limited to 'src/backend/executor/nodeHash.c')
0 files changed, 0 insertions, 0 deletions