Skip to content

Commit 9d8ae79

Browse files
author
Thomas G. Lockhart
committed
Add debugging statements.
1 parent 6e34dc3 commit 9d8ae79

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

src/backend/utils/adt/arrayfuncs.c

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.11 1997/07/24 20:15:45 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.12 1997/07/29 15:51:33 thomas Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -33,13 +33,13 @@
3333
#define ASSGN "="
3434

3535
/* An array has the following internal structure:
36-
* <nbytes> - total number of bytes
37-
* <ndim> - number of dimensions of the array
38-
* <flags> - bit mask of flags
39-
* <dim> - size of each array axis
40-
* <dim_lower> - lower boundary of each dimension
41-
* <actual data> - whatever is the stored data
42-
*/
36+
* <nbytes> - total number of bytes
37+
* <ndim> - number of dimensions of the array
38+
* <flags> - bit mask of flags
39+
* <dim> - size of each array axis
40+
* <dim_lower> - lower boundary of each dimension
41+
* <actual data> - whatever is the stored data
42+
*/
4343

4444
/*-=-=--=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-*/
4545
static int _ArrayCount(char *str, int dim[], int typdelim);
@@ -148,6 +148,14 @@ array_in(char *string, /* input array in external form */
148148
while (isspace(*p)) p++;
149149
}
150150

151+
#ifdef ARRAYDEBUG
152+
printf( "array_in- ndim %d (", ndim);
153+
for (i = 0; i < ndim; i++) {
154+
printf(" %d", dim[i]);
155+
};
156+
printf( ") for %s\n", string);
157+
#endif
158+
151159
nitems = getNitems( ndim, dim);
152160
if (nitems == 0) {
153161
char *emptyArray = palloc(sizeof(ArrayType));

0 commit comments

Comments
 (0)