From: Tom Lane Date: Wed, 7 Aug 2019 22:09:28 +0000 (-0400) Subject: Doc: document permissions required for ANALYZE. X-Git-Tag: REL_12_BETA4~79 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a1008caf0ac6960cb32b8a4c9b24d371db2a32b3;p=postgresql Doc: document permissions required for ANALYZE. VACUUM's reference page had this text, but ANALYZE's didn't. That's a clear oversight given that section 5.7 explicitly delegates the responsibility to define permissions requirements to the individual commands' man pages. Per gripe from Isaac Morland. Back-patch to all supported branches. Discussion: https://postgr.es/m/CAMsGm5fp3oBUs-2iRfii0iEO=fZuJALVyM2zJLhNTjG34gpAVQ@mail.gmail.com --- diff --git a/doc/src/sgml/ref/analyze.sgml b/doc/src/sgml/ref/analyze.sgml index 4e70b513b5..5ac3ba8321 100644 --- a/doc/src/sgml/ref/analyze.sgml +++ b/doc/src/sgml/ref/analyze.sgml @@ -147,6 +147,16 @@ ANALYZE [ VERBOSE ] [ table_and_columns Notes + + To analyze a table, one must ordinarily be the table's owner or a + superuser. However, database owners are allowed to + analyze all tables in their databases, except shared catalogs. + (The restriction for shared catalogs means that a true database-wide + ANALYZE can only be performed by a superuser.) + ANALYZE will skip over any tables that the calling user + does not have permission to analyze. + + Foreign tables are analyzed only when explicitly selected. Not all foreign data wrappers support ANALYZE. If the table's