Commit 78778608 authored by Bruce Momjian's avatar Bruce Momjian

contrib/array_iterator/array_iterator.c won't compile.

Included patches should fix the problem.
--
Tatsuo Ishii
parent 33cac03c
...@@ -28,10 +28,11 @@ ...@@ -28,10 +28,11 @@
#include "array_iterator.h" #include "array_iterator.h"
static int32
array_iterator(Oid elemtype, Oid proc, int and, ArrayType *array, Datum value) array_iterator(Oid elemtype, Oid proc, int and, ArrayType *array, Datum value)
{ {
HeapTuple typ_tuple; HeapTuple typ_tuple;
TypeTupleForm typ_struct; Form_pg_type typ_struct;
bool typbyval; bool typbyval;
int typlen; int typlen;
func_ptr proc_fn; func_ptr proc_fn;
...@@ -43,6 +44,7 @@ array_iterator(Oid elemtype, Oid proc, int and, ArrayType *array, Datum value) ...@@ -43,6 +44,7 @@ array_iterator(Oid elemtype, Oid proc, int and, ArrayType *array, Datum value)
*dim; *dim;
char *p; char *p;
FmgrInfo finf; /*Tobias Gabele Jan 18 1999*/ FmgrInfo finf; /*Tobias Gabele Jan 18 1999*/
/* Sanity checks */ /* Sanity checks */
if ((array == (ArrayType *) NULL) if ((array == (ArrayType *) NULL)
...@@ -67,7 +69,7 @@ array_iterator(Oid elemtype, Oid proc, int and, ArrayType *array, Datum value) ...@@ -67,7 +69,7 @@ array_iterator(Oid elemtype, Oid proc, int and, ArrayType *array, Datum value)
elog(ERROR, "array_iterator: cache lookup failed for type %d", elemtype); elog(ERROR, "array_iterator: cache lookup failed for type %d", elemtype);
return 0; return 0;
} }
typ_struct = (TypeTupleForm) GETSTRUCT(typ_tuple); typ_struct = (Form_pg_type) GETSTRUCT(typ_tuple);
typlen = typ_struct->typlen; typlen = typ_struct->typlen;
typbyval = typ_struct->typbyval; typbyval = typ_struct->typbyval;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment