contrib/intarray regression failure fix - Mailing list pgsql-patches

From Joe Conway
Subject contrib/intarray regression failure fix
Date
Msg-id 3D79390A.50404@joeconway.com
Whole thread Raw
Responses Re: contrib/intarray regression failure fix
Re: contrib/intarray regression failure fix
List pgsql-patches
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.

Please apply.

Thanks,

Joe
Index: contrib/intarray/_int.c
===================================================================
RCS file: /opt/src/cvs/pgsql-server/contrib/intarray/_int.c,v
retrieving revision 1.20
diff -c -r1.20 _int.c
*** contrib/intarray/_int.c    4 Sep 2002 20:31:06 -0000    1.20
--- contrib/intarray/_int.c    6 Sep 2002 23:11:25 -0000
***************
*** 17,22 ****
--- 17,23 ----
  #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,928 ****
--- 924,930 ----
      r->flags &= ~LEAFKEY;
      *((int *) ARR_DIMS(r)) = num;
      *((int *) ARR_LBOUND(r)) = 1;
+     ARR_ELEMTYPE(r) = INT4OID;

      return r;
  }

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Big number of "unused" pages as reported by VACUUM
Next
From: Alvaro Herrera
Date:
Subject: Re: indisclustered and clusterdb