-CLUSTER [VERBOSE] table_name [ USING index_name ]
-CLUSTER ( option [, ...] ) table_name [ USING index_name ]
-CLUSTER [VERBOSE]
+CLUSTER [ ( option [, ...] ) ] table_name [ USING index_name ]
+CLUSTER [ VERBOSE ] [ table_name [ USING index_name ] ]
where option can be one of:
/*****************************************************************************
*
* QUERY:
- * CLUSTER [VERBOSE] [ USING ]
- * CLUSTER [ (options) ] [ USING ]
- * CLUSTER [VERBOSE]
+ * CLUSTER (options) [ USING ]
+ * CLUSTER [VERBOSE] [ [ USING ] ]
* CLUSTER [VERBOSE] ON (for pre-8.3)
*
*****************************************************************************/
ClusterStmt:
- CLUSTER opt_verbose qualified_name cluster_index_specification
+ CLUSTER '(' utility_option_list ')' qualified_name cluster_index_specification
{
ClusterStmt *n = makeNode(ClusterStmt);
- n->relation = $3;
- n->indexname = $4;
- n->params = NIL;
- if ($2)
- n->params = lappend(n->params, makeDefElem("verbose", NULL, @2));
+ n->relation = $5;
+ n->indexname = $6;
+ n->params = $3;
$$ = (Node *) n;
}
-
- | CLUSTER '(' utility_option_list ')' qualified_name cluster_index_specification
+ /* unparenthesized VERBOSE kept for pre-14 compatibility */
+ | CLUSTER opt_verbose qualified_name cluster_index_specification
{
ClusterStmt *n = makeNode(ClusterStmt);
- n->relation = $5;
- n->indexname = $6;
- n->params = $3;
+ n->relation = $3;
+ n->indexname = $4;
+ n->params = NIL;
+ if ($2)
+ n->params = lappend(n->params, makeDefElem("verbose", NULL, @2));
$$ = (Node *) n;
}
| CLUSTER opt_verbose