mirror of
https://github.com/postgres/postgres.git
synced 2025-04-24 10:47:04 +03:00
Rearrange CLUSTER rules in gram.y.
This change moves the unparenthesized syntax for CLUSTER to the end of the ClusterStmt rules in preparation for a follow-up commit that will move this syntax to the "Compatibility" section of the CLUSTER documentation. The documentation for the CLUSTER syntaxes has also been consolidated. Suggested-by: Melanie Plageman Discussion https://postgr.es/m/CAAKRu_bc5uHieG1976kGqJKxyWtyQt9yvktjsVX%2Bi7NOigDjOA%40mail.gmail.com
This commit is contained in:
parent
d65ddaca93
commit
018b61f81b
@ -21,9 +21,8 @@ PostgreSQL documentation
|
||||
|
||||
<refsynopsisdiv>
|
||||
<synopsis>
|
||||
CLUSTER [VERBOSE] <replaceable class="parameter">table_name</replaceable> [ USING <replaceable class="parameter">index_name</replaceable> ]
|
||||
CLUSTER ( <replaceable class="parameter">option</replaceable> [, ...] ) <replaceable class="parameter">table_name</replaceable> [ USING <replaceable class="parameter">index_name</replaceable> ]
|
||||
CLUSTER [VERBOSE]
|
||||
CLUSTER [ ( <replaceable class="parameter">option</replaceable> [, ...] ) ] <replaceable class="parameter">table_name</replaceable> [ USING <replaceable class="parameter">index_name</replaceable> ]
|
||||
CLUSTER [ VERBOSE ] [ <replaceable class="parameter">table_name</replaceable> [ USING <replaceable class="parameter">index_name</replaceable> ] ]
|
||||
|
||||
<phrase>where <replaceable class="parameter">option</replaceable> can be one of:</phrase>
|
||||
|
||||
|
@ -11553,15 +11553,24 @@ CreateConversionStmt:
|
||||
/*****************************************************************************
|
||||
*
|
||||
* QUERY:
|
||||
* CLUSTER [VERBOSE] <qualified_name> [ USING <index_name> ]
|
||||
* CLUSTER [ (options) ] <qualified_name> [ USING <index_name> ]
|
||||
* CLUSTER [VERBOSE]
|
||||
* CLUSTER (options) <qualified_name> [ USING <index_name> ]
|
||||
* CLUSTER [VERBOSE] [ <qualified_name> [ USING <index_name> ] ]
|
||||
* CLUSTER [VERBOSE] <index_name> ON <qualified_name> (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 = $5;
|
||||
n->indexname = $6;
|
||||
n->params = $3;
|
||||
$$ = (Node *) n;
|
||||
}
|
||||
/* unparenthesized VERBOSE kept for pre-14 compatibility */
|
||||
| CLUSTER opt_verbose qualified_name cluster_index_specification
|
||||
{
|
||||
ClusterStmt *n = makeNode(ClusterStmt);
|
||||
|
||||
@ -11572,16 +11581,6 @@ ClusterStmt:
|
||||
n->params = lappend(n->params, makeDefElem("verbose", NULL, @2));
|
||||
$$ = (Node *) n;
|
||||
}
|
||||
|
||||
| CLUSTER '(' utility_option_list ')' qualified_name cluster_index_specification
|
||||
{
|
||||
ClusterStmt *n = makeNode(ClusterStmt);
|
||||
|
||||
n->relation = $5;
|
||||
n->indexname = $6;
|
||||
n->params = $3;
|
||||
$$ = (Node *) n;
|
||||
}
|
||||
| CLUSTER opt_verbose
|
||||
{
|
||||
ClusterStmt *n = makeNode(ClusterStmt);
|
||||
|
Loading…
x
Reference in New Issue
Block a user