contrib/intarray regression failure fix
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
Attachments:
intarray-fix.1.patchtext/plain; name=intarray-fix.1.patchDownload+2-0
Your patch has been added to the PostgreSQL unapplied patches list at:
http://candle.pha.pa.us/cgi-bin/pgpatches
I will try to apply it within the next 48 hours.
---------------------------------------------------------------------------
Joe Conway wrote:
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;
}
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
Patch applied. Thanks.
---------------------------------------------------------------------------
Joe Conway wrote:
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;
}
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073