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
#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"
r->flags &= ~LEAFKEY;
*((int *) ARR_DIMS(r)) = num;
*((int *) ARR_LBOUND(r)) = 1;
+ ARR_ELEMTYPE(r) = INT4OID;
return r;
}