Add debugging statements.
authorThomas G. Lockhart
Tue, 29 Jul 1997 15:51:33 +0000 (15:51 +0000)
committerThomas G. Lockhart
Tue, 29 Jul 1997 15:51:33 +0000 (15:51 +0000)
src/backend/utils/adt/arrayfuncs.c

index a024bc5a54823d93ff68f65435877b20da148511..eb099e973ec23ad591c29fc7573d3482ec91a657 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *    $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.11 1997/07/24 20:15:45 momjian Exp $
+ *    $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.12 1997/07/29 15:51:33 thomas Exp $
  *
  *-------------------------------------------------------------------------
  */
 #define ASSGN    "="
 
 /* An array has the following internal structure:
- *                - total number of bytes 
- *                     - number of dimensions of the array 
- *                    - bit mask of flags
- *                    - size of each array axis 
- *                - lower boundary of each dimension 
- *            - whatever is the stored data
-*/
+ *          - total number of bytes 
+ *            - number of dimensions of the array 
+ *           - bit mask of flags
+ *             - size of each array axis 
+ *       - lower boundary of each dimension 
+ *     - whatever is the stored data
+ */
 
 /*-=-=--=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-*/
 static int _ArrayCount(char *str, int dim[], int typdelim);
@@ -148,6 +148,14 @@ array_in(char *string,     /* input array in external form */
         while (isspace(*p)) p++;
     }        
     
+#ifdef ARRAYDEBUG
+printf( "array_in- ndim %d (", ndim);
+for (i = 0; i < ndim; i++) {
+    printf(" %d", dim[i]);
+};
+printf( ") for %s\n", string);
+#endif
+
     nitems = getNitems( ndim, dim);
     if (nitems == 0) {
         char *emptyArray = palloc(sizeof(ArrayType));