From ab29a7a9c6ffaddaf6788a13e83f1a249f06bb1b Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Wed, 19 Jul 2023 15:26:59 -0700 Subject: [PATCH] Doc: move unparenthesized syntaxes for a few commands. Move documentation of the unparenthesized syntaxes for VACUUM, ANALYZE, EXPLAIN, and CLUSTER to the "Compatibility" section of their documentation to improve readability of the preferred, parenthesized syntaxes. Author: Melanie Plageman Discussion: https://postgr.es/m/CAAKRu_bc5uHieG1976kGqJKxyWtyQt9yvktjsVX%2Bi7NOigDjOA%40mail.gmail.com --- doc/src/sgml/ref/analyze.sgml | 16 ++++++++-------- doc/src/sgml/ref/cluster.sgml | 14 ++++++++++---- doc/src/sgml/ref/explain.sgml | 19 ++++++++++--------- doc/src/sgml/ref/vacuum.sgml | 20 ++++++++++---------- 4 files changed, 38 insertions(+), 31 deletions(-) diff --git a/doc/src/sgml/ref/analyze.sgml b/doc/src/sgml/ref/analyze.sgml index aa3e9e1c5f..1fba089265 100644 --- a/doc/src/sgml/ref/analyze.sgml +++ b/doc/src/sgml/ref/analyze.sgml @@ -22,7 +22,6 @@ PostgreSQL documentation ANALYZE [ ( option [, ...] ) ] [ table_and_columns [, ...] ] -ANALYZE [ VERBOSE ] [ table_and_columns [, ...] ] where option can be one of: @@ -56,13 +55,6 @@ ANALYZE [ VERBOSE ] [ table_and_columns - - - When the option list is surrounded by parentheses, the options can be - written in any order. The parenthesized syntax was added in - PostgreSQL 11; the unparenthesized syntax - is deprecated. - @@ -339,6 +331,14 @@ ANALYZE [ VERBOSE ] [ table_and_columns There is no ANALYZE statement in the SQL standard. + + + The following syntax was used before PostgreSQL + version 11 and is still supported: + +ANALYZE [ VERBOSE ] [ table_and_columns [, ...] ] + + diff --git a/doc/src/sgml/ref/cluster.sgml b/doc/src/sgml/ref/cluster.sgml index b6d5655c19..557a94cea7 100644 --- a/doc/src/sgml/ref/cluster.sgml +++ b/doc/src/sgml/ref/cluster.sgml @@ -22,7 +22,6 @@ PostgreSQL documentation CLUSTER [ ( option [, ...] ) ] [ table_name [ USING index_name ] ] -CLUSTER [ VERBOSE ] [ table_name [ USING index_name ] ] where option can be one of: @@ -240,12 +239,19 @@ CLUSTER; - The syntax + The following syntax was used before PostgreSQL + 17 and is still supported: + +CLUSTER [ VERBOSE ] [ table_name [ USING index_name ] ] + + + + + The following syntax was used before PostgreSQL + 8.3 and is still supported: CLUSTER index_name ON table_name - is also supported for compatibility with pre-8.3 PostgreSQL - versions. diff --git a/doc/src/sgml/ref/explain.sgml b/doc/src/sgml/ref/explain.sgml index 410490951b..ae493c86d6 100644 --- a/doc/src/sgml/ref/explain.sgml +++ b/doc/src/sgml/ref/explain.sgml @@ -32,7 +32,6 @@ PostgreSQL documentation EXPLAIN [ ( option [, ...] ) ] statement -EXPLAIN [ ANALYZE ] [ VERBOSE ] statement where option can be one of: @@ -106,14 +105,6 @@ ROLLBACK; - - - Only the ANALYZE and VERBOSE options - can be specified, and only in that order, without surrounding the option - list in parentheses. Prior to PostgreSQL 9.0, - the unparenthesized syntax was the only one supported. It is expected that - all new options will be supported only in the parenthesized syntax. - @@ -529,6 +520,16 @@ EXPLAIN (GENERIC_PLAN) There is no EXPLAIN statement defined in the SQL standard. + + + The following syntax was used before PostgreSQL + version 9.0 and is still supported: + +EXPLAIN [ ANALYZE ] [ VERBOSE ] statement + + Note that in this syntax, the options must be specified in exactly the order + shown. + diff --git a/doc/src/sgml/ref/vacuum.sgml b/doc/src/sgml/ref/vacuum.sgml index 65c03bf829..90cde70c07 100644 --- a/doc/src/sgml/ref/vacuum.sgml +++ b/doc/src/sgml/ref/vacuum.sgml @@ -22,7 +22,6 @@ PostgreSQL documentation VACUUM [ ( option [, ...] ) ] [ table_and_columns [, ...] ] -VACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] [ ANALYZE ] [ table_and_columns [, ...] ] where option can be one of: @@ -90,15 +89,6 @@ VACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] [ ANALYZE ] [ table_and_columns [, ...] ] + + Note that in this syntax, the options must be specified in exactly the order + shown. +