]> granicus.if.org Git - postgresql/blobdiff - contrib/intarray/_int_tool.c
Fix intarray's GiST opclasses to not fail for empty arrays with <@.
[postgresql] / contrib / intarray / _int_tool.c
index 2d3e50178f6c16b1f0ec1db77995d36c36afbe95..fde8d15e2c2e5faeb635a17842f0867a06a5305a 100644 (file)
@@ -256,7 +256,7 @@ resize_intArrayType(ArrayType *a, int num)
        if (num <= 0)
        {
                Assert(num == 0);
-               ARR_NDIM(a) = 0;
+               a = construct_empty_array(INT4OID);
                return a;
        }