Re: fix and document CLUSTER privileges

Nathan Bossart <nathandbossart@gmail.com>

From: Nathan Bossart <nathandbossart@gmail.com>
To: Gilles Darold <gilles@migops.com>
Cc: Andrew Dunstan <andrew@dunslane.net>, Justin Pryzby <pryzby@telsasoft.com>, Robert Haas <robertmhaas@gmail.com>, pgsql-hackers@postgresql.org, pgsql@j-davis.com
Date: 2023-01-14T22:40:00Z
Lists: pgsql-hackers
On Sat, Jan 14, 2023 at 10:40:40AM +0100, Gilles Darold wrote:
> Nathan, please confirm and fix the status of this commit fest entry.

Yes, thank you for taking care of this.  I believe the only changes in this
patch that didn't make it into ff9618e are the following documentation
adjustments.  I've added Jeff to get his thoughts.

diff --git a/doc/src/sgml/ref/cluster.sgml b/doc/src/sgml/ref/cluster.sgml
index b9f2acb1de..29f0f1fd90 100644
--- a/doc/src/sgml/ref/cluster.sgml
+++ b/doc/src/sgml/ref/cluster.sgml
@@ -67,7 +67,8 @@ CLUSTER [VERBOSE]
   </para>
 
   <para>
-   <command>CLUSTER</command> without any parameter reclusters all the
+   <command>CLUSTER</command> without a
+   <replaceable class="parameter">table_name</replaceable> reclusters all the
    previously-clustered tables in the current database that the calling user
    has privileges for.  This form of <command>CLUSTER</command> cannot be
    executed inside a transaction block.
@@ -211,7 +212,8 @@ CLUSTER [VERBOSE]
    <para>
     Clustering a partitioned table clusters each of its partitions using the
     partition of the specified partitioned index.  When clustering a partitioned
-    table, the index may not be omitted.
+    table, the index may not be omitted.  <command>CLUSTER</command> on a
+    partitioned table cannot be executed inside a transaction block.
    </para>
 
  </refsect1>

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com



Commits

  1. Clarify documentation for CLUSTER on partitioned tables.

  2. Fix MAINTAIN privileges for toast tables and partitions.

  3. Have CLUSTER ignore partitions not owned by caller