summaryrefslogtreecommitdiff
path: root/src/include/nodes/primnodes.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2003-08-17 23:43:27 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2003-08-17 23:43:27 +0000
commite945246321506732ac9d2cab74b49782e12c4768 (patch)
tree21750343b4eab195c8281a2117aec693e6ed750d /src/include/nodes/primnodes.h
parentde9c553f6bd931c311e6e05e172bb860dc8f0d5e (diff)
downloadpostgresql-e945246321506732ac9d2cab74b49782e12c4768.tar.gz
Fix ARRAY[] construct so that in multidimensional case, elements can
be anything yielding an array of the proper kind, not only sub-ARRAY[] constructs; do subscript checking at runtime not parse time. Also, adjust array_cat to make array || array comply with the SQL99 spec. Joe Conway
Diffstat (limited to 'src/include/nodes/primnodes.h')
-rw-r--r--src/include/nodes/primnodes.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/include/nodes/primnodes.h b/src/include/nodes/primnodes.h
index f6e4436d95..2d86b48c41 100644
--- a/src/include/nodes/primnodes.h
+++ b/src/include/nodes/primnodes.h
@@ -10,7 +10,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: primnodes.h,v 1.91 2003/08/11 23:04:50 tgl Exp $
+ * $Id: primnodes.h,v 1.92 2003/08/17 23:43:26 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -587,16 +587,18 @@ typedef struct CaseWhen
/*
* ArrayExpr - an ARRAY[] expression
*
- * Note: if ndims > 1, then the array elements are all ArrayExprs of the
- * same type and ndims one less.
+ * Note: if multidims is false, the constituent expressions all yield the
+ * scalar type identified by element_typeid. If multidims is true, the
+ * constituent expressions all yield arrays of element_typeid (ie, the same
+ * type as array_typeid); at runtime we must check for compatible subscripts.
*/
typedef struct ArrayExpr
{
Expr xpr;
Oid array_typeid; /* type of expression result */
- Oid element_typeid; /* common type of expression elements */
- List *elements; /* the array elements */
- int ndims; /* number of array dimensions */
+ Oid element_typeid; /* common type of array elements */
+ List *elements; /* the array elements or sub-arrays */
+ bool multidims; /* true if elements are sub-arrays */
} ArrayExpr;
/*