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

From Bruce Momjian
Subject Re: contrib/intarray regression failure fix
Date
Msg-id 200209110402.g8B42VM11586@candle.pha.pa.us
Whole thread Raw
In response to contrib/intarray regression failure fix  (Joe Conway <mail@joeconway.com>)
List pgsql-patches
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

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Please rename split(text,text,int) to splitpart
Next
From: Bruce Momjian
Date:
Subject: Re: indisclustered and clusterdb