From dec7711a92d51b65bf95588c7d077e7c08d3f6a9 Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Fri, 19 Feb 2021 01:08:45 +0000 Subject: [PATCH v2] 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 | 43 ++++++++++++++++++++++++++++++++++++++++++ doc/src/sgml/ref/set_role.sgml | 7 ++++++- 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index e81141e45c..3150cda8aa 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -9220,6 +9220,49 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' + + role (string) + + role configuration parameter + + + + + Sets the current user identifier. See + SET ROLE for more + information. + + + This parameter can only be changed at connection start via + command-line options or at + run time via SET, + SET ROLE, + ALTER ROLE, or + ALTER DATABASE. + + + + + + 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 or + SET SESSION AUTHORIZATION. + + + + diff --git a/doc/src/sgml/ref/set_role.sgml b/doc/src/sgml/ref/set_role.sgml index 739f2c5cdf..a69bfeae24 100644 --- a/doc/src/sgml/ref/set_role.sgml +++ b/doc/src/sgml/ref/set_role.sgml @@ -54,7 +54,12 @@ RESET ROLE The NONE and RESET forms reset the current - user identifier to be the current session user identifier. + user identifier to the default value. The default value is whatever value it + would be if no SET had been executed in the current + session. This can be the command-line option value, the per-database default + setting, or the per-user default setting for the role, 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