@@ -65,6 +65,7 @@ ALTER ROLE { <replaceable class="parameter">role_specification</replaceable> | A
65
65
<phrase>where <replaceable class="parameter">role_specification</replaceable> can be:</phrase>
66
66
67
67
<replaceable class="parameter">role_name</replaceable>
68
+ | CURRENT_ROLE
68
69
| CURRENT_USER
69
70
| SESSION_USER
70
71
</synopsis>
@@ -95,6 +96,7 @@ ALTER ROLE { <replaceable class="parameter">role_specification</replaceable> | A
95
96
<phrase>其中<replaceable class="parameter">role_specification</replaceable>可以是:</phrase>
96
97
97
98
<replaceable class="parameter">role_name</replaceable>
99
+ | CURRENT_ROLE
98
100
| CURRENT_USER
99
101
| SESSION_USER
100
102
</synopsis>
@@ -121,11 +123,11 @@ ____________________________________________________________________________-->
121
123
<para>
122
124
The first variant of this command listed in the synopsis can change
123
125
many of the role attributes that can be specified in
124
- <xref linkend="sql-createrole"/ >.
126
+ <link linkend="sql-createrole"><command>CREATE ROLE</command></link >.
125
127
(All the possible attributes are covered,
126
128
except that there are no options for adding or removing memberships; use
127
- <xref linkend="sql-grant"/ > and
128
- <xref linkend="sql-revoke"/ > for that.)
129
+ <link linkend="sql-grant"><command>GRANT</command></link > and
130
+ <link linkend="sql-revoke"><command>REVOKE</command></link > for that.)
129
131
Attributes not mentioned in the command retain their previous settings.
130
132
Database superusers can change any of these settings for any role.
131
133
Roles having <literal>CREATEROLE</literal> privilege can change any of these
@@ -136,10 +138,10 @@ ____________________________________________________________________________-->
136
138
</para>
137
139
____________________________________________________________________________-->
138
140
<para>
139
- 前面列出的这个命令的第一种变体能够更改<xref linkend="sql-createrole"/ >中
141
+ 前面列出的这个命令的第一种变体能够更改<link linkend="sql-createrole"><command>CREATE ROLE</command></link >中
140
142
指定的很多角色属性(覆盖了所有可能的属性,不过没有增加和移除成员关系的选项,
141
- 如果要增加和移除成员关系可使用<xref linkend="sql-grant"/ >和
142
- <xref linkend="sql-revoke"/ >)。该命令中没有提到的属性保持它们之前的设置。
143
+ 如果要增加和移除成员关系可使用<link linkend="sql-grant"><command>GRANT</command></link >和
144
+ <link linkend="sql-revoke"><command>REVOKE</command></link >)。该命令中没有提到的属性保持它们之前的设置。
143
145
数据库超级用户能够更改任何角色的任何这些设置。具有<literal>CREATEROLE</literal>
144
146
特权的角色能够更改除<literal>SUPERUSER</literal>,<literal>REPLICATION</literal>和
145
147
<literal>BYPASSRLS</literal>外的任何这些设置,但是只能为非超级用户和非复制角色修改。普通
@@ -193,8 +195,8 @@ ____________________________________________________________________________-->
193
195
default, overriding whatever setting is present in
194
196
<filename>postgresql.conf</filename> or has been received from the <command>postgres</command>
195
197
command line. This only happens at login time; executing
196
- <xref linkend="sql-set-role"/ > or
197
- <xref linkend="sql-set-session-authorization"/ > does not cause new
198
+ <link linkend="sql-set-role"><command>SET ROLE</command></link > or
199
+ <link linkend="sql-set-session-authorization"><command>SET SESSION AUTHORIZATION</command></link > does not cause new
198
200
configuration values to be set.
199
201
Settings set for all databases are overridden by database-specific settings
200
202
attached to a role. Settings for specific databases or specific roles override
@@ -205,8 +207,8 @@ ____________________________________________________________________________-->
205
207
只要改角色后续开始一个新会话,指定的值将会成为该会话的默认值,并且会覆盖
206
208
<filename>postgresql.conf</filename>中存在的值或者从
207
209
<command>postgres</command>命令行收到的值。这只在登录时发生,执行
208
- <xref linkend="sql-set-role"/ >或者
209
- <xref linkend="sql-set-session-authorization"/ >不会导致新的配置值被设置。
210
+ <link linkend="sql-set-role"><command>SET ROLE</command></link >或者
211
+ <link linkend="sql-set-session-authorization"><command>SET SESSION AUTHORIZATION</command></link >不会导致新的配置值被设置。
210
212
对于所有数据库设置的值会被附加到一个角色的数据库相关的设置所覆盖。特定数
211
213
据库或角色的设置会覆盖为所有角色所作的设置。
212
214
</para>
@@ -255,8 +257,10 @@ ____________________________________________________________________________-->
255
257
256
258
<varlistentry>
257
259
<!--==========================orignal english content==========================
260
+ <term><literal>CURRENT_ROLE</literal></term>
258
261
<term><literal>CURRENT_USER</literal></term>
259
262
____________________________________________________________________________-->
263
+ <term><literal>CURRENT_ROLE</literal></term>
260
264
<term><literal>CURRENT_USER</literal></term>
261
265
<listitem>
262
266
<!--==========================orignal english content==========================
@@ -365,12 +369,12 @@ ____________________________________________________________________________-->
365
369
<!--==========================orignal english content==========================
366
370
<para>
367
371
These clauses alter attributes originally set by
368
- <xref linkend="sql-createrole"/ >. For more information, see the
372
+ <link linkend="sql-createrole"><command>CREATE ROLE</command></link >. For more information, see the
369
373
<command>CREATE ROLE</command> reference page.
370
374
</para>
371
375
____________________________________________________________________________-->
372
376
<para>
373
- 这些子句修改原来有<xref linkend="sql-createrole"/ >
377
+ 这些子句修改原来有<link linkend="sql-createrole"><command>CREATE ROLE</command></link >
374
378
设置的属性。更多信息请见
375
379
<command>CREATE ROLE</command>参考页。
376
380
</para>
@@ -451,15 +455,15 @@ ____________________________________________________________________________-->
451
455
<!--==========================orignal english content==========================
452
456
<para>
453
457
Role-specific variable settings take effect only at login;
454
- <xref linkend="sql-set-role"/ > and
455
- <xref linkend="sql-set-session-authorization"/ >
458
+ <link linkend="sql-set-role"><command>SET ROLE</command></link > and
459
+ <link linkend="sql-set-session-authorization"><command>SET SESSION AUTHORIZATION</command></link >
456
460
do not process role-specific variable settings.
457
461
</para>
458
462
____________________________________________________________________________-->
459
463
<para>
460
464
角色相关的变量设置只在登录时生效,
461
- <xref linkend="sql-set-role"/ >以及
462
- <xref linkend="sql-set-session-authorization"/ >不会处理角色
465
+ <link linkend="sql-set-role"><command>SET ROLE</command></link >以及
466
+ <link linkend="sql-set-session-authorization"><command>SET SESSION AUTHORIZATION</command></link >不会处理角色
463
467
相关的变量设置。
464
468
</para>
465
469
@@ -487,27 +491,27 @@ ____________________________________________________________________________-->
487
491
488
492
<!--==========================orignal english content==========================
489
493
<para>
490
- Use <xref linkend="sql-createrole"/ >
491
- to add new roles, and <xref linkend="sql-droprole"/ > to remove a role.
494
+ Use <link linkend="sql-createrole"><command>CREATE ROLE</command></link >
495
+ to add new roles, and <link linkend="sql-droprole"><command>DROP ROLE</command></link > to remove a role.
492
496
</para>
493
497
____________________________________________________________________________-->
494
498
<para>
495
- 使用<xref linkend="sql-createrole"/ >增加新角色,使用
496
- <xref linkend="sql-droprole"/ >移除一个角色。
499
+ 使用<link linkend="sql-createrole"><command>CREATE ROLE</command></link >增加新角色,使用
500
+ <link linkend="sql-droprole"><command>DROP ROLE</command></link >移除一个角色。
497
501
</para>
498
502
499
503
<!--==========================orignal english content==========================
500
504
<para>
501
505
<command>ALTER ROLE</command> cannot change a role's memberships.
502
- Use <xref linkend="sql-grant"/ > and
503
- <xref linkend="sql-revoke"/ >
506
+ Use <link linkend="sql-grant"><command>GRANT</command></link > and
507
+ <link linkend="sql-revoke"><command>REVOKE</command></link >
504
508
to do that.
505
509
</para>
506
510
____________________________________________________________________________-->
507
511
<para>
508
512
<command>ALTER ROLE</command>无法更改一个角色成员关系。
509
- 可以使用<xref linkend="sql-grant"/ >和
510
- <xref linkend="sql-revoke"/ >来实现。
513
+ 可以使用<link linkend="sql-grant"><command>GRANT</command></link >和
514
+ <link linkend="sql-revoke"><command>REVOKE</command></link >来实现。
511
515
</para>
512
516
513
517
<!--==========================orignal english content==========================
0 commit comments