Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit09be4f4

Browse files
nathan-bossartpull[bot]
authored andcommitted
Rearrange CLUSTER rules in gram.y.
This change moves the unparenthesized syntax for CLUSTER to the endof the ClusterStmt rules in preparation for a follow-up commit thatwill move this syntax to the "Compatibility" section of the CLUSTERdocumentation. The documentation for the CLUSTER syntaxes has alsobeen consolidated.Suggested-by: Melanie PlagemanDiscussionhttps://postgr.es/m/CAAKRu_bc5uHieG1976kGqJKxyWtyQt9yvktjsVX%2Bi7NOigDjOA%40mail.gmail.com
1 parentf565e2d commit09be4f4

File tree

2 files changed

+15
-17
lines changed

2 files changed

+15
-17
lines changed

‎doc/src/sgml/ref/cluster.sgml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@ PostgreSQL documentation
2121

2222
<refsynopsisdiv>
2323
<synopsis>
24-
CLUSTER [VERBOSE] <replaceable class="parameter">table_name</replaceable> [ USING <replaceable class="parameter">index_name</replaceable> ]
25-
CLUSTER ( <replaceable class="parameter">option</replaceable> [, ...] ) <replaceable class="parameter">table_name</replaceable> [ USING <replaceable class="parameter">index_name</replaceable> ]
26-
CLUSTER [VERBOSE]
24+
CLUSTER [ ( <replaceable class="parameter">option</replaceable> [, ...] ) ] <replaceable class="parameter">table_name</replaceable> [ USING <replaceable class="parameter">index_name</replaceable> ]
25+
CLUSTER [ VERBOSE ] [ <replaceable class="parameter">table_name</replaceable> [ USING <replaceable class="parameter">index_name</replaceable> ] ]
2726

2827
<phrase>where <replaceable class="parameter">option</replaceable> can be one of:</phrase>
2928

‎src/backend/parser/gram.y

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11553,33 +11553,32 @@ CreateConversionStmt:
1155311553
/*****************************************************************************
1155411554
*
1155511555
*QUERY:
11556-
*CLUSTER [VERBOSE] <qualified_name> [ USING <index_name> ]
11557-
*CLUSTER [ (options) ] <qualified_name> [ USING <index_name> ]
11558-
*CLUSTER [VERBOSE]
11556+
*CLUSTER (options) <qualified_name> [ USING <index_name> ]
11557+
*CLUSTER [VERBOSE] [ <qualified_name> [ USING <index_name> ] ]
1155911558
*CLUSTER [VERBOSE] <index_name> ON <qualified_name> (for pre-8.3)
1156011559
*
1156111560
*****************************************************************************/
1156211561

1156311562
ClusterStmt:
11564-
CLUSTERopt_verbosequalified_namecluster_index_specification
11563+
CLUSTER'('utility_option_list')'qualified_namecluster_index_specification
1156511564
{
1156611565
ClusterStmt *n = makeNode(ClusterStmt);
1156711566

11568-
n->relation =$3;
11569-
n->indexname =$4;
11570-
n->params = NIL;
11571-
if ($2)
11572-
n->params = lappend(n->params, makeDefElem("verbose",NULL,@2));
11567+
n->relation =$5;
11568+
n->indexname =$6;
11569+
n->params =$3;
1157311570
$$ = (Node *) n;
1157411571
}
11575-
11576-
|CLUSTER'('utility_option_list')'qualified_namecluster_index_specification
11572+
/* unparenthesized VERBOSE kept for pre-14 compatibility*/
11573+
|CLUSTERopt_verbosequalified_namecluster_index_specification
1157711574
{
1157811575
ClusterStmt *n = makeNode(ClusterStmt);
1157911576

11580-
n->relation =$5;
11581-
n->indexname =$6;
11582-
n->params =$3;
11577+
n->relation =$3;
11578+
n->indexname =$4;
11579+
n->params = NIL;
11580+
if ($2)
11581+
n->params = lappend(n->params, makeDefElem("verbose",NULL,@2));
1158311582
$$ = (Node *) n;
1158411583
}
1158511584
|CLUSTERopt_verbose

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp