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

Commit921059b

Browse files
committed
Don't allow VACUUM VERBOSE ANALYZE VERBOSE.
There are plans to extend the syntax for ANALYZE, so we need to breakthe link between VacuumStmt and AnalyzeStmt. But apart from that, thesyntax above is undocumented and, if discovered by users, might givethe impression that the VERBOSE option for VACUUM differs from theverbose option from ANALYZE, which it does not.Nathan Bossart, reviewed by Michael Paquier and Masahiko SawadaDiscussion:http://postgr.es/m/D3FC73E2-9B1A-4DB4-8180-55F57D116B4E@amazon.com
1 parentbc7fa0c commit921059b

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

‎src/backend/parser/gram.y

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ static Node *makeRecursiveViewSelect(char *relname, List *aliases, Node *query);
437437

438438
%type<boolean>opt_instead
439439
%type<boolean>opt_uniqueopt_concurrentlyopt_verboseopt_full
440-
%type<boolean>opt_freezeopt_defaultopt_recheck
440+
%type<boolean>opt_freezeopt_analyzeopt_defaultopt_recheck
441441
%type<defelt>opt_binaryopt_oidscopy_delimiter
442442

443443
%type<boolean>copy_fromopt_program
@@ -10462,7 +10462,7 @@ cluster_index_specification:
1046210462
*
1046310463
*****************************************************************************/
1046410464

10465-
VacuumStmt:VACUUMopt_fullopt_freezeopt_verboseopt_vacuum_relation_list
10465+
VacuumStmt:VACUUMopt_fullopt_freezeopt_verboseopt_analyzeopt_vacuum_relation_list
1046610466
{
1046710467
VacuumStmt *n = makeNode(VacuumStmt);
1046810468
n->options = VACOPT_VACUUM;
@@ -10472,19 +10472,9 @@ VacuumStmt: VACUUM opt_full opt_freeze opt_verbose opt_vacuum_relation_list
1047210472
n->options |= VACOPT_FREEZE;
1047310473
if ($4)
1047410474
n->options |= VACOPT_VERBOSE;
10475-
n->rels =$5;
10476-
$$ = (Node *)n;
10477-
}
10478-
|VACUUMopt_fullopt_freezeopt_verboseAnalyzeStmt
10479-
{
10480-
VacuumStmt *n = (VacuumStmt *)$5;
10481-
n->options |= VACOPT_VACUUM;
10482-
if ($2)
10483-
n->options |= VACOPT_FULL;
10484-
if ($3)
10485-
n->options |= VACOPT_FREEZE;
10486-
if ($4)
10487-
n->options |= VACOPT_VERBOSE;
10475+
if ($5)
10476+
n->options |= VACOPT_ANALYZE;
10477+
n->rels =$6;
1048810478
$$ = (Node *)n;
1048910479
}
1049010480
|VACUUM'('vacuum_option_list')'opt_vacuum_relation_list
@@ -10534,6 +10524,11 @@ analyze_keyword:
1053410524
|ANALYSE/* British*/{}
1053510525
;
1053610526

10527+
opt_analyze:
10528+
analyze_keyword{$$ =true; }
10529+
|/*EMPTY*/{$$ =false; }
10530+
;
10531+
1053710532
opt_verbose:
1053810533
VERBOSE{$$ =true; }
1053910534
|/*EMPTY*/{$$ =false; }

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp