Re: Move un-parenthesized syntax docs to "compatibility" for few SQL commands

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>, Tom Lane <tgl@sss.pgh.pa.us>
Date: 2023-05-16T06:28:17Z
Lists: pgsql-hackers
On Mon, May 15, 2023 at 12:36:51PM -0700, Nathan Bossart wrote:
> There's still some time before we'll be able to commit any of these, but
> here is an attempt at addressing all the feedback thus far.

-   The parenthesized syntax was added in
-   <productname>PostgreSQL</productname> 9.0;  the unparenthesized
-   syntax is deprecated.
[...]
+           | CLUSTER '(' utility_option_list ')'
+               {
+                   ClusterStmt *n = makeNode(ClusterStmt);
+
+                   n->relation = NULL;
+                   n->indexname = NULL;
+                   n->params = $3;
+                   $$ = (Node *) n;
+               }

Hmm.  This is older than the oldest version we have to support for
pg_upgrade and co.  Would it be worth switching clusterdb to use the
parenthesized grammar, adding on the way a test for this new grammar
flavor without a table in the TAP tests (too costly for the main
regression test suite)?
--
Michael

Commits

  1. Doc: move unparenthesized syntaxes for a few commands.

  2. Support parenthesized syntax for CLUSTER without a table name.