From: Bruce Momjian Date: Sat, 28 Mar 2009 03:26:02 +0000 (+0000) Subject: Better document that SET ROLE does not uset ALTER ROLE SET settings; X-Git-Tag: REL8_4_BETA1~103 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8fbef1090bb2a43e3458ec7f9910af618e22bdb3;p=postgresql Better document that SET ROLE does not uset ALTER ROLE SET settings; suggested wording from Josh Berkus. --- diff --git a/doc/src/sgml/ref/alter_role.sgml b/doc/src/sgml/ref/alter_role.sgml index 09e073a415..cef9b5d8ab 100644 --- a/doc/src/sgml/ref/alter_role.sgml +++ b/doc/src/sgml/ref/alter_role.sgml @@ -1,5 +1,5 @@ @@ -79,19 +79,18 @@ ALTER ROLE name RESET ALL password is MD5-encrypted. - - The remaining variants change a role's session default for - a specified configuration variable. Whenever the role subsequently - starts a new session, the specified value becomes the session default, - overriding whatever setting is present in postgresql.conf - or has been received from the postgres command line. - (For a role without LOGIN privilege, session defaults have - no effect.) - Ordinary roles can change their own session defaults. - Superusers can change anyone's session defaults. - Roles having CREATEROLE privilege can change defaults for - non-superuser roles. - Certain variables cannot be set this way, or can only be + + The remaining variants change a role's session default for a + specified configuration variable. Whenever the role subsequently + starts a new session, the specified value becomes the session + default, overriding whatever setting is present in + postgresql.conf or has been received from the postgres + command line. This only happens at login time, so configuration + settings associated with a role to which you've will be ignored. + Superusers can change anyone's session defaults. Roles having + CREATEROLE privilege can change defaults for non-superuser + roles. Certain variables cannot be set this way, or can only be set if a superuser issues the command. @@ -162,6 +161,12 @@ ALTER ROLE name RESET ALL the parameter as the role-specific value. + + Role-specific variable setting take effect only at login; + + does not process role-specific variable settings. + + See and for more information about allowed diff --git a/doc/src/sgml/ref/set_role.sgml b/doc/src/sgml/ref/set_role.sgml index d678e8e8d1..87cc9dadd6 100644 --- a/doc/src/sgml/ref/set_role.sgml +++ b/doc/src/sgml/ref/set_role.sgml @@ -1,5 +1,5 @@ @@ -91,6 +91,13 @@ RESET ROLE allowed to a later SET ROLE. + + SET ROLE does not process session variables as specified by + the role's settings; this only happens during + login. + + SET ROLE cannot be used within a SECURITY DEFINER function.