Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8fbef10

Browse files
committed
Better document that SET ROLE does not uset ALTER ROLE SET settings;
suggested wording from Josh Berkus.
1 parent3ab95c2 commit8fbef10

File tree

2 files changed

+27
-15
lines changed

2 files changed

+27
-15
lines changed

‎doc/src/sgml/ref/alter_role.sgml

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_role.sgml,v 1.11 2008/11/14 10:22:45 petere Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_role.sgml,v 1.12 2009/03/28 03:26:02 momjian Exp $
33
PostgreSQL documentation
44
-->
55

@@ -79,19 +79,18 @@ ALTER ROLE <replaceable class="PARAMETER">name</replaceable> RESET ALL
7979
password is <literal>MD5</>-encrypted.
8080
</para>
8181

82-
<para>
83-
The remaining variants change a role's session default for
84-
a specified configuration variable. Whenever the role subsequently
85-
starts a new session, the specified value becomes the session default,
86-
overriding whatever setting is present in <filename>postgresql.conf</>
87-
or has been received from the <command>postgres</command> command line.
88-
(For a role without <literal>LOGIN</> privilege, session defaults have
89-
no effect.)
90-
Ordinary roles can change their own session defaults.
91-
Superusers can change anyone's session defaults.
92-
Roles having <literal>CREATEROLE</> privilege can change defaults for
93-
non-superuser roles.
94-
Certain variables cannot be set this way, or can only be
82+
<para>
83+
The remaining variants change a role's session default for a
84+
specified configuration variable. Whenever the role subsequently
85+
starts a new session, the specified value becomes the session
86+
default, overriding whatever setting is present in
87+
<filename>postgresql.conf</> or has been received from the postgres
88+
command line. This only happens at login time, so configuration
89+
settings associated with a role to which you've <xref
90+
linkend="sql-set-role" endterm="sql-set-role-title"> will be ignored.
91+
Superusers can change anyone's session defaults. Roles having
92+
<literal>CREATEROLE</> privilege can change defaults for non-superuser
93+
roles. Certain variables cannot be set this way, or can only be
9594
set if a superuser issues the command.
9695
</para>
9796
</refsect1>
@@ -162,6 +161,12 @@ ALTER ROLE <replaceable class="PARAMETER">name</replaceable> RESET ALL
162161
the parameter as the role-specific value.
163162
</para>
164163

164+
<para>
165+
Role-specific variable setting take effect only at login;
166+
<xref linkend="sql-set-role" endterm="sql-set-role-title">
167+
does not process role-specific variable settings.
168+
</para>
169+
165170
<para>
166171
See <xref linkend="sql-set" endterm="sql-set-title"> and <xref
167172
linkend="runtime-config"> for more information about allowed

‎doc/src/sgml/ref/set_role.sgml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/set_role.sgml,v 1.6 2008/11/14 10:22:47 petere Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/set_role.sgml,v 1.7 2009/03/28 03:26:02 momjian Exp $
33
PostgreSQL documentation
44
-->
55

@@ -91,6 +91,13 @@ RESET ROLE
9191
allowed to a later <command>SET ROLE</>.
9292
</para>
9393

94+
<para>
95+
<command>SET ROLE</> does not process session variables as specified by
96+
the role's <xref linkend="sql-alterrole"
97+
endterm="sql-alterrole-title"> settings; this only happens during
98+
login.
99+
</para>
100+
94101
<para>
95102
<command>SET ROLE</> cannot be used within a
96103
<literal>SECURITY DEFINER</> function.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp