From 266d4d252af0da109d5ce69bf67b2170f449756c Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Thu, 11 Mar 2021 19:13:40 +0000 Subject: [PATCH v4 1/1] Small documentation fix for SET ROLE. This change clarifies the behavior of RESET ROLE when "role" is set per-user, per-database, or via command-line options. Also, it adds configuration parameter entries for "role" and "session_authorization". --- doc/src/sgml/config.sgml | 74 ++++++++++++++++++++++++++++++++++++++++++ doc/src/sgml/ref/set_role.sgml | 13 ++++++-- 2 files changed, 84 insertions(+), 3 deletions(-) diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index a218d78bef..4b47268715 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -9139,6 +9139,80 @@ SET XML OPTION { DOCUMENT | CONTENT }; + + Identification + + + + role (string) + + role configuration parameter + + + + + Sets the current user identifier. See + SET ROLE for more + information. + + + This parameter can be changed at connection-time via + command-line options, + ALTER ROLE, and + ALTER DATABASE + and at run-time via SET + and SET ROLE. It + cannot be set via the server configuration files, the server command + line, or + ALTER SYSTEM. + + + + While connection-time settings for role modify a + session's default setting for role, such settings do + not affect other default settings for the session. The originally + authenticated session user is used to determine other session defaults. + + + + + + + session_authorization (string) + + session_authorization configuration parameter + + + + + Sets the session user identifier and the current user identifier. See + SET SESSION AUTHORIZATION + for more information. + + + This parameter can only be changed at run-time via + SET and + SET SESSION AUTHORIZATION. + It cannot be set via the server configuration files, the server command + line, or + ALTER SYSTEM. + + + + While it is possible to provide a connection-time setting for this + parameter via + command-line options, + ALTER ROLE, and + ALTER DATABASE, + such settings are silently ignored. + + + + + + + + Other Defaults diff --git a/doc/src/sgml/ref/set_role.sgml b/doc/src/sgml/ref/set_role.sgml index 739f2c5cdf..f02babf3af 100644 --- a/doc/src/sgml/ref/set_role.sgml +++ b/doc/src/sgml/ref/set_role.sgml @@ -53,9 +53,16 @@ RESET ROLE - The NONE and RESET forms reset the current - user identifier to be the current session user identifier. - These forms can be executed by any user. + SET ROLE NONE sets the current user identifier to the + current session user identifier, as returned by + session_user. RESET ROLE sets the + current user identifier to the connection-time setting specified by the + command-line options, + ALTER ROLE, or + ALTER DATABASE, + if any such settings exist. Otherwise, RESET ROLE sets + the current user identifier to the current session user identifier. These + forms can be executed by any user. -- 2.16.6