]> granicus.if.org Git - postgresql/commitdiff
The attached small patch fixes the cause of the regression test failure
authorBruce Momjian <bruce@momjian.us>
Thu, 12 Sep 2002 00:15:33 +0000 (00:15 +0000)
committerBruce Momjian <bruce@momjian.us>
Thu, 12 Sep 2002 00:15:33 +0000 (00:15 +0000)
for contrib/intarray.

The cause was that the library uses its own function to construct a new
array, new_intArrayType, and that function did not set the new array
struct attribute elemtype.

Joe Conway

contrib/intarray/_int.c

index 09590a28527f0ef13489f2728536255a816de000..f4fc63d1c18b3957809bac17466dc22d9e5c6311 100644 (file)
@@ -17,6 +17,7 @@
 #include "access/gist.h"
 #include "access/itup.h"
 #include "access/rtree.h"
+#include "catalog/pg_type.h"
 #include "utils/elog.h"
 #include "utils/palloc.h"
 #include "utils/array.h"
@@ -923,6 +924,7 @@ new_intArrayType(int num)
        r->flags &= ~LEAFKEY;
        *((int *) ARR_DIMS(r)) = num;
        *((int *) ARR_LBOUND(r)) = 1;
+       ARR_ELEMTYPE(r) = INT4OID;
 
        return r;
 }