diff options
| author | Tom Lane | 2003-08-17 23:43:27 +0000 |
|---|---|---|
| committer | Tom Lane | 2003-08-17 23:43:27 +0000 |
| commit | e945246321506732ac9d2cab74b49782e12c4768 (patch) | |
| tree | 21750343b4eab195c8281a2117aec693e6ed750d /src/include | |
| parent | de9c553f6bd931c311e6e05e172bb860dc8f0d5e (diff) | |
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')
| -rw-r--r-- | src/include/catalog/catversion.h | 4 | ||||
| -rw-r--r-- | src/include/nodes/primnodes.h | 14 |
2 files changed, 10 insertions, 8 deletions
diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h index 9d4f80b727b..ffc48a300a7 100644 --- a/src/include/catalog/catversion.h +++ b/src/include/catalog/catversion.h @@ -37,7 +37,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: catversion.h,v 1.207 2003/08/17 19:58:06 tgl Exp $ + * $Id: catversion.h,v 1.208 2003/08/17 23:43:26 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -53,6 +53,6 @@ */ /* yyyymmddN */ -#define CATALOG_VERSION_NO 200308171 +#define CATALOG_VERSION_NO 200308172 #endif diff --git a/src/include/nodes/primnodes.h b/src/include/nodes/primnodes.h index f6e4436d950..2d86b48c411 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; /* |
