On Fri, Apr 21, 2023 at 07:29:59PM -0400, Melanie Plageman wrote: > Attached v2 includes changes for CLUSTER syntax docs. I wasn't quite > sure that we can move down CLUSTER [VERBOSE] syntax to the compatibility > section since CLUSTER (VERBOSE) doesn't work. This seems like it should > work (VACUUM and ANALYZE do). I put extra "[ ]" around the main CLUSTER > syntax but I don't know that this is actually the same as documenting > that CLUSTER VERBOSE does work but CLUSTER (VERBOSE) doesn't.
AFAICT there isn't a strong reason to disallow CLUSTER (VERBOSE). The following short patch seems to do the trick: diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index acf6cf4866..215c4ba39c 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -11603,6 +11603,15 @@ ClusterStmt: n->params = $3; $$ = (Node *) n; } + | CLUSTER '(' utility_option_list ')' + { + ClusterStmt *n = makeNode(ClusterStmt); + + n->relation = NULL; + n->indexname = NULL; + n->params = $3; + $$ = (Node *) n; + } | CLUSTER opt_verbose { ClusterStmt *n = makeNode(ClusterStmt); >> Most of these commands have an existing note about the deprecated syntax. >> Could those be removed with this change? > > Ah, yes. Good catch! I have removed these. Thanks. I'll take a closer look at the patch soon. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com