On 2022/09/14 14:27, bt22kawamotok wrote:
I update patch to reflect master update.
Thanks for updating the patch!
+ <para>
+ Shows whether the current user is a superuser or not.
+ </para>
How about adding the note about when this parameter can change,
like we do for in_hot_standby docs? I applied this change to the patch.
Attached is the updated version of the patch.
Regards,
--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 700914684d..0f910d580c 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -10584,6 +10584,23 @@ dynamic_library_path =
'C:\tools\postgresql;H:\my_project\lib;$libdir'
</listitem>
</varlistentry>
+ <varlistentry id="guc-is-superuser" xreflabel="is_superuser">
+ <term><varname>is_superuser</varname> (<type>boolean</type>)
+ <indexterm>
+ <primary><varname>is_superuser</varname> configuration
parameter</primary>
+ </indexterm>
+ </term>
+ <listitem>
+ <para>
+ Reports whether the current user is a superuser.
+ Within a session, this can change when the current user is changed by
+ <link linkend="sql-set-role"><command>SET ROLE</command></link>,
+ <link linkend="sql-set-session-authorization"><command>
+ SET SESSION AUTHORIZATION</command></link>, etc.
+ </para>
+ </listitem>
+ </varlistentry>
+
<varlistentry id="guc-lc-collate" xreflabel="lc_collate">
<term><varname>lc_collate</varname> (<type>string</type>)
<indexterm>
diff --git a/doc/src/sgml/ref/show.sgml b/doc/src/sgml/ref/show.sgml
index b3747b119f..d8721be805 100644
--- a/doc/src/sgml/ref/show.sgml
+++ b/doc/src/sgml/ref/show.sgml
@@ -100,15 +100,6 @@ SHOW ALL
</para>
</listitem>
</varlistentry>
-
- <varlistentry>
- <term><literal>IS_SUPERUSER</literal></term>
- <listitem>
- <para>
- True if the current role has superuser privileges.
- </para>
- </listitem>
- </varlistentry>
</variablelist></para>
</listitem>
</varlistentry>
diff --git a/src/backend/utils/misc/guc_tables.c
b/src/backend/utils/misc/guc_tables.c
index 550e95056c..1e57ee16b8 100644
--- a/src/backend/utils/misc/guc_tables.c
+++ b/src/backend/utils/misc/guc_tables.c
@@ -989,11 +989,10 @@ struct config_bool ConfigureNamesBool[] =
NULL, NULL, NULL
},
{
- /* Not for general use --- used by SET SESSION AUTHORIZATION */
- {"is_superuser", PGC_INTERNAL, UNGROUPED,
+ {"is_superuser", PGC_INTERNAL, PRESET_OPTIONS,
gettext_noop("Shows whether the current user is a
superuser."),
NULL,
- GUC_REPORT | GUC_NO_SHOW_ALL | GUC_NO_RESET_ALL |
GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
+ GUC_REPORT | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
},
&session_auth_is_superuser,
false,