From f364779a4804754aff29112fb6d65762144f849b Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Wed, 10 Mar 2021 01:18:25 +0000 Subject: [PATCH v3 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 | 68 ++++++++++++++++++++++++++++++++++++++++++ doc/src/sgml/ref/set_role.sgml | 10 +++++-- 2 files changed, 75 insertions(+), 3 deletions(-) diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 529876895b..ffedd6cc14 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -9179,6 +9179,74 @@ 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. + + + + 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. + + + + 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..4eaec8d669 100644 --- a/doc/src/sgml/ref/set_role.sgml +++ b/doc/src/sgml/ref/set_role.sgml @@ -53,9 +53,13 @@ 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. + The NONE form resets the current user identifier to the + current session user identifier. The RESET form resets + the current user identifier to the default value. The default value can be + the command-line option value, the per-database default setting, or the + per-user default setting for the originally authenticated session user, if + any such settings exist. Otherwise, the default value will be the current + session user identifier. These forms can be executed by any user. -- 2.16.6