From 5dd74c0f213e07d378066f0284f8807959b069e1 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Thu, 12 Sep 2002 00:15:33 +0000 Subject: [PATCH] The attached small patch fixes the cause of the regression test failure 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/intarray/_int.c b/contrib/intarray/_int.c index 09590a2852..f4fc63d1c1 100644 --- a/contrib/intarray/_int.c +++ b/contrib/intarray/_int.c @@ -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; }