-
+
Arrays
pay_by_quarter integer ARRAY[4],
- This syntax requires an integer constant to denote the array size.
+ Or, if no array size is to be specified:
+ pay_by_quarter integer ARRAY,
+
As before, however,
PostgreSQL> does not enforce the
- size restriction.
+ size restriction in any case.
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.631 2008/10/28 14:09:45 petere Exp $
+ * $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.632 2008/10/29 11:24:53 petere Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
$$->arrayBounds = $3;
$$->setof = TRUE;
}
+ /* SQL standard syntax, currently only one-dimensional */
| SimpleTypename ARRAY '[' Iconst ']'
{
- /* SQL99's redundant syntax */
$$ = $1;
$$->arrayBounds = list_make1(makeInteger($4));
}
| SETOF SimpleTypename ARRAY '[' Iconst ']'
{
- /* SQL99's redundant syntax */
$$ = $2;
$$->arrayBounds = list_make1(makeInteger($5));
$$->setof = TRUE;
}
+ | SimpleTypename ARRAY
+ {
+ $$ = $1;
+ $$->arrayBounds = list_make1(makeInteger(-1));
+ }
+ | SETOF SimpleTypename ARRAY
+ {
+ $$ = $2;
+ $$->arrayBounds = list_make1(makeInteger(-1));
+ $$->setof = TRUE;
+ }
;
opt_array_bounds: