|
7 | 7 | *
|
8 | 8 | *
|
9 | 9 | * IDENTIFICATION
|
10 |
| - * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.24 1998/01/15 19:45:01 pgsql Exp $ |
| 10 | + * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.25 1998/02/13 19:45:53 momjian Exp $ |
11 | 11 | *
|
12 | 12 | *-------------------------------------------------------------------------
|
13 | 13 | */
|
|
43 | 43 |
|
44 | 44 | /*-=-=--=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-*/
|
45 | 45 | static int _ArrayCount(char *str, int dim[], int typdelim);
|
46 |
| -static char * |
47 |
| -_ReadArrayStr(char *arrayStr, int nitems, int ndim, int dim[], |
| 46 | +static char *_ReadArrayStr(char *arrayStr, int nitems, int ndim, int dim[], |
48 | 47 | FmgrInfo *inputproc, Oid typelem, char typdelim,
|
49 | 48 | int typlen, bool typbyval, char typalign,
|
50 |
| - int *nbytes); |
| 49 | + int *nbytes, int16 typmod); |
51 | 50 |
|
52 | 51 | #ifdef LOARRAY
|
53 | 52 | static char *
|
@@ -93,7 +92,8 @@ static char *array_seek(char *ptr, int eltsize, int nitems);
|
93 | 92 | */
|
94 | 93 | char *
|
95 | 94 | array_in(char *string, /* input array in external form */
|
96 |
| - Oid element_type) /* type OID of an array element */ |
| 95 | + Oid element_type, /* type OID of an array element */ |
| 96 | + int16 typmod) |
97 | 97 | {
|
98 | 98 | int typlen;
|
99 | 99 | bool typbyval,
|
@@ -208,7 +208,7 @@ array_in(char *string, /* input array in external form */
|
208 | 208 | /* array not a large object */
|
209 | 209 | dataPtr =
|
210 | 210 | (char *) _ReadArrayStr(p, nitems, ndim, dim, &inputproc, typelem,
|
211 |
| - typdelim, typlen, typbyval, typalign, |
| 211 | + typmod, typdelim, typlen, typbyval, typalign, |
212 | 212 | &nbytes);
|
213 | 213 | nbytes += ARR_OVERHEAD(ndim);
|
214 | 214 | retval = (ArrayType *) palloc(nbytes);
|
@@ -369,6 +369,7 @@ _ReadArrayStr(char *arrayStr,
|
369 | 369 | FmgrInfo *inputproc, /* function used for the
|
370 | 370 | * conversion */
|
371 | 371 | Oid typelem,
|
| 372 | + int16 typmod, |
372 | 373 | char typdelim,
|
373 | 374 | int typlen,
|
374 | 375 | bool typbyval,
|
@@ -460,7 +461,7 @@ _ReadArrayStr(char *arrayStr,
|
460 | 461 | *q = '\0';
|
461 | 462 | if (i >= nitems)
|
462 | 463 | elog(ERROR, "array_in: illformed array constant");
|
463 |
| - values[i] = (*fmgr_faddr(inputproc)) (p, typelem); |
| 464 | + values[i] = (*fmgr_faddr(inputproc)) (p, typelem, typmod); |
464 | 465 | p = ++q;
|
465 | 466 | if (!eoArray)
|
466 | 467 |
|
|
0 commit comments