mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
Don't emit non-canonical empty arrays in array_remove().
Dean Rasheed
This commit is contained in:
@@ -5398,6 +5398,14 @@ array_replace_internal(ArrayType *array,
|
||||
return array;
|
||||
}
|
||||
|
||||
/* If all elements were removed return an empty array */
|
||||
if (nresult == 0)
|
||||
{
|
||||
pfree(values);
|
||||
pfree(nulls);
|
||||
return construct_empty_array(element_type);
|
||||
}
|
||||
|
||||
/* Allocate and initialize the result array */
|
||||
if (hasnulls)
|
||||
{
|
||||
|
Reference in New Issue
Block a user