Use array_contains_nulls instead of ARR_HASNULL on user-supplied arrays.
Tom Lane <tgl@sss.pgh.pa.us>
Use array_contains_nulls instead of ARR_HASNULL on user-supplied arrays. This applies the fix for bug #5784 to remaining places where we wish to reject nulls in user-supplied arrays. In all these places, there's no reason not to allow a null bitmap to be present, so long as none of the current elements are actually null. I did not change some other places where we are looking at system catalog entries or aggregate transition values, as the presence of a null bitmap in such an array would be suspicious.
Files
| Path | Change | +/− |
|---|---|---|
| contrib/cube/cube.c | modified | +3 −3 |
| contrib/ltree/lquery_op.c | modified | +1 −1 |
| contrib/ltree/_ltree_gist.c | modified | +2 −2 |
| contrib/ltree/ltree_gist.c | modified | +1 −1 |
| contrib/ltree/_ltree_op.c | modified | +3 −3 |
| src/backend/utils/adt/arrayfuncs.c | modified | +2 −2 |
| src/backend/utils/adt/arrayutils.c | modified | +1 −1 |
| src/backend/utils/adt/tsrank.c | modified | +1 −1 |