mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
Add defenses against nulls-in-arrays to contrib/ltree. Possibly it'd
be useful to actually do something with nulls, rather than reject them, but I'll just close the hole for now.
This commit is contained in:
@ -607,6 +607,10 @@ arrq_cons(ltree_gist * key, ArrayType *_query)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_ARRAY_SUBSCRIPT_ERROR),
|
||||
errmsg("array must be one-dimensional")));
|
||||
if (ARR_HASNULL(_query))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED),
|
||||
errmsg("array must not contain nulls")));
|
||||
|
||||
while (num > 0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user