Skip to content

Commit 18c2274

Browse files
committed
翻译14.1 alter_* x 18.
1 parent c12dadd commit 18c2274

18 files changed

+314
-152
lines changed

postgresql/doc/src/sgml/ref/alter_procedure.sgml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ ALTER PROCEDURE <replaceable>name</replaceable> [ ( [ [ <replaceable class="para
4545
ALTER PROCEDURE <replaceable>name</replaceable> [ ( [ [ <replaceable class="parameter">argmode</replaceable> ] [ <replaceable class="parameter">argname</replaceable> ] <replaceable class="parameter">argtype</replaceable> [, ...] ] ) ]
4646
RENAME TO <replaceable>new_name</replaceable>
4747
ALTER PROCEDURE <replaceable>name</replaceable> [ ( [ [ <replaceable class="parameter">argmode</replaceable> ] [ <replaceable class="parameter">argname</replaceable> ] <replaceable class="parameter">argtype</replaceable> [, ...] ] ) ]
48-
OWNER TO { <replaceable>new_owner</replaceable> | CURRENT_USER | SESSION_USER }
48+
OWNER TO { <replaceable>new_owner</replaceable> | CURRENT_ROLE | CURRENT_USER | SESSION_USER }
4949
ALTER PROCEDURE <replaceable>name</replaceable> [ ( [ [ <replaceable class="parameter">argmode</replaceable> ] [ <replaceable class="parameter">argname</replaceable> ] <replaceable class="parameter">argtype</replaceable> [, ...] ] ) ]
5050
SET SCHEMA <replaceable>new_schema</replaceable>
5151
ALTER PROCEDURE <replaceable>name</replaceable> [ ( [ [ <replaceable class="parameter">argmode</replaceable> ] [ <replaceable class="parameter">argname</replaceable> ] <replaceable class="parameter">argtype</replaceable> [, ...] ] ) ]
52-
DEPENDS ON EXTENSION <replaceable>extension_name</replaceable>
52+
[ NO ] DEPENDS ON EXTENSION <replaceable>extension_name</replaceable>
5353

5454
<phrase>where <replaceable class="parameter">action</replaceable> is one of:</phrase>
5555

@@ -66,11 +66,11 @@ ALTER PROCEDURE <replaceable>name</replaceable> [ ( [ [ <replaceable class="para
6666
ALTER PROCEDURE <replaceable>name</replaceable> [ ( [ [ <replaceable class="parameter">argmode</replaceable> ] [ <replaceable class="parameter">argname</replaceable> ] <replaceable class="parameter">argtype</replaceable> [, ...] ] ) ]
6767
RENAME TO <replaceable>new_name</replaceable>
6868
ALTER PROCEDURE <replaceable>name</replaceable> [ ( [ [ <replaceable class="parameter">argmode</replaceable> ] [ <replaceable class="parameter">argname</replaceable> ] <replaceable class="parameter">argtype</replaceable> [, ...] ] ) ]
69-
OWNER TO { <replaceable>new_owner</replaceable> | CURRENT_USER | SESSION_USER }
69+
OWNER TO { <replaceable>new_owner</replaceable> | CURRENT_ROLE | CURRENT_USER | SESSION_USER }
7070
ALTER PROCEDURE <replaceable>name</replaceable> [ ( [ [ <replaceable class="parameter">argmode</replaceable> ] [ <replaceable class="parameter">argname</replaceable> ] <replaceable class="parameter">argtype</replaceable> [, ...] ] ) ]
7171
SET SCHEMA <replaceable>new_schema</replaceable>
7272
ALTER PROCEDURE <replaceable>name</replaceable> [ ( [ [ <replaceable class="parameter">argmode</replaceable> ] [ <replaceable class="parameter">argname</replaceable> ] <replaceable class="parameter">argtype</replaceable> [, ...] ] ) ]
73-
DEPENDS ON EXTENSION <replaceable>extension_name</replaceable>
73+
[ NO ] DEPENDS ON EXTENSION <replaceable>extension_name</replaceable>
7474

7575
<phrase>其中<replaceable class="parameter">action</replaceable>是下列之一:</phrase>
7676

@@ -149,12 +149,14 @@ ____________________________________________________________________________-->
149149
<listitem>
150150
<!--==========================orignal english content==========================
151151
<para>
152-
The mode of an argument: <literal>IN</literal> or <literal>VARIADIC</literal>.
153-
If omitted, the default is <literal>IN</literal>.
152+
The mode of an argument: <literal>IN</literal>, <literal>OUT</literal>,
153+
<literal>INOUT</literal>, or <literal>VARIADIC</literal>. If omitted,
154+
the default is <literal>IN</literal>.
154155
</para>
155156
____________________________________________________________________________-->
156157
<para>
157-
参数的模式:<literal>IN</literal>或<literal>VARIADIC</literal>。如果被省略,默认是<literal>IN</literal>。
158+
参数的模式:<literal>IN</literal>, <literal>OUT</literal>,
159+
<literal>INOUT</literal>, 或<literal>VARIADIC</literal>。如果被省略,默认是<literal>IN</literal>。
158160
</para>
159161
</listitem>
160162
</varlistentry>
@@ -171,11 +173,11 @@ ____________________________________________________________________________-->
171173
The name of an argument.
172174
Note that <command>ALTER PROCEDURE</command> does not actually pay
173175
any attention to argument names, since only the argument data
174-
types are needed to determine the procedure's identity.
176+
types are used to determine the procedure's identity.
175177
</para>
176178
____________________________________________________________________________-->
177179
<para>
178-
参数的名字。注意<command>ALTER PROCEDURE</command>实际上并不关心参数名,因为只需要参数的数据类型来确定过程的身份
180+
参数的名字。注意<command>ALTER PROCEDURE</command>实际上并不关心参数名,因为仅有参数的数据类型被用来确定过程的身份
179181
</para>
180182
</listitem>
181183
</varlistentry>
@@ -191,10 +193,13 @@ ____________________________________________________________________________-->
191193
<para>
192194
The data type(s) of the procedure's arguments (optionally
193195
schema-qualified), if any.
196+
See <xref linkend="sql-dropprocedure"/> for the details of how
197+
the procedure is looked up using the argument data type(s).
194198
</para>
195199
____________________________________________________________________________-->
196200
<para>
197201
如果该过程有参数,这是参数的数据类型(可以被方案限定)。
202+
有关如何使用参数数据类型来查找过程的详细信息,参见<xref linkend="sql-dropprocedure"/>。
198203
</para>
199204
</listitem>
200205
</varlistentry>

postgresql/doc/src/sgml/ref/alter_publication.sgml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ ALTER PUBLICATION <replaceable class="parameter">name</replaceable> ADD TABLE [
4444
ALTER PUBLICATION <replaceable class="parameter">name</replaceable> SET TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] [, ...]
4545
ALTER PUBLICATION <replaceable class="parameter">name</replaceable> DROP TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] [, ...]
4646
ALTER PUBLICATION <replaceable class="parameter">name</replaceable> SET ( <replaceable class="parameter">publication_parameter</replaceable> [= <replaceable class="parameter">value</replaceable>] [, ... ] )
47-
ALTER PUBLICATION <replaceable class="parameter">name</replaceable> OWNER TO { <replaceable>new_owner</replaceable> | CURRENT_USER | SESSION_USER }
47+
ALTER PUBLICATION <replaceable class="parameter">name</replaceable> OWNER TO { <replaceable>new_owner</replaceable> | CURRENT_ROLE | CURRENT_USER | SESSION_USER }
4848
ALTER PUBLICATION <replaceable class="parameter">name</replaceable> RENAME TO <replaceable>new_name</replaceable>
4949
</synopsis>
5050
____________________________________________________________________________-->
@@ -53,7 +53,7 @@ ALTER PUBLICATION <replaceable class="parameter">name</replaceable> ADD TABLE [
5353
ALTER PUBLICATION <replaceable class="parameter">name</replaceable> SET TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] [, ...]
5454
ALTER PUBLICATION <replaceable class="parameter">name</replaceable> DROP TABLE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] [, ...]
5555
ALTER PUBLICATION <replaceable class="parameter">name</replaceable> SET ( <replaceable class="parameter">publication_parameter</replaceable> [= <replaceable class="parameter">value</replaceable>] [, ... ] )
56-
ALTER PUBLICATION <replaceable class="parameter">name</replaceable> OWNER TO { <replaceable>new_owner</replaceable> | CURRENT_USER | SESSION_USER }
56+
ALTER PUBLICATION <replaceable class="parameter">name</replaceable> OWNER TO { <replaceable>new_owner</replaceable> | CURRENT_ROLE | CURRENT_USER | SESSION_USER }
5757
ALTER PUBLICATION <replaceable class="parameter">name</replaceable> RENAME TO <replaceable>new_name</replaceable>
5858
</synopsis>
5959
</refsynopsisdiv>
@@ -118,20 +118,19 @@ ____________________________________________________________________________-->
118118

119119
<!--==========================orignal english content==========================
120120
<para>
121-
You must own the publication to use <command>ALTER PUBLICATION</command>.
121+
You must own the publication to use <command>ALTER PUBLICATION</command>.Adding a table to a publication additionally requires owning that table.
122122
To alter the owner, you must also be a direct or indirect member of the new
123123
owning role. The new owner must have <literal>CREATE</literal> privilege on
124124
the database. Also, the new owner of a <literal>FOR ALL TABLES</literal>
125125
publication must be a superuser. However, a superuser can change the
126-
ownership of a publication while circumventing these restrictions.
126+
ownership of a publication regardless of these restrictions.
127127
</para>
128128
____________________________________________________________________________-->
129129
<para>
130-
你必须拥有该发布才能使用<command>ALTER PUBLICATION</command>。要改变所有者,
131-
你也必须是新所有者角色的直接或间接成员。新的所有者必须在数据库上拥有
130+
你必须拥有该发布才能使用<command>ALTER PUBLICATION</command>。向发布中添加表还需要拥有该表。
131+
要改变所有者,你也必须是新所有者角色的直接或间接成员。新的所有者必须在数据库上拥有
132132
<literal>CREATE</literal>权限。此外,<literal>FOR ALL TABLES</literal>
133-
发布的新所有者必须是超级用户。但是,
134-
超级用户可以在避开这些限制的情况下更改发布的所有权。
133+
发布的新所有者必须是超级用户。但是,超级用户可以更改发布的所有权,而不受这些限制。
135134
</para>
136135
</refsect1>
137136

postgresql/doc/src/sgml/ref/alter_role.sgml

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ ALTER ROLE { <replaceable class="parameter">role_specification</replaceable> | A
6565
<phrase>where <replaceable class="parameter">role_specification</replaceable> can be:</phrase>
6666

6767
<replaceable class="parameter">role_name</replaceable>
68+
| CURRENT_ROLE
6869
| CURRENT_USER
6970
| SESSION_USER
7071
</synopsis>
@@ -95,6 +96,7 @@ ALTER ROLE { <replaceable class="parameter">role_specification</replaceable> | A
9596
<phrase>其中<replaceable class="parameter">role_specification</replaceable>可以是:</phrase>
9697

9798
<replaceable class="parameter">role_name</replaceable>
99+
| CURRENT_ROLE
98100
| CURRENT_USER
99101
| SESSION_USER
100102
</synopsis>
@@ -121,11 +123,11 @@ ____________________________________________________________________________-->
121123
<para>
122124
The first variant of this command listed in the synopsis can change
123125
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>.
125127
(All the possible attributes are covered,
126128
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.)
129131
Attributes not mentioned in the command retain their previous settings.
130132
Database superusers can change any of these settings for any role.
131133
Roles having <literal>CREATEROLE</literal> privilege can change any of these
@@ -136,10 +138,10 @@ ____________________________________________________________________________-->
136138
</para>
137139
____________________________________________________________________________-->
138140
<para>
139-
前面列出的这个命令的第一种变体能够更改<xref linkend="sql-createrole"/>中
141+
前面列出的这个命令的第一种变体能够更改<link linkend="sql-createrole"><command>CREATE ROLE</command></link>中
140142
指定的很多角色属性(覆盖了所有可能的属性,不过没有增加和移除成员关系的选项,
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>)。该命令中没有提到的属性保持它们之前的设置。
143145
数据库超级用户能够更改任何角色的任何这些设置。具有<literal>CREATEROLE</literal>
144146
特权的角色能够更改除<literal>SUPERUSER</literal>,<literal>REPLICATION</literal>和
145147
<literal>BYPASSRLS</literal>外的任何这些设置,但是只能为非超级用户和非复制角色修改。普通
@@ -193,8 +195,8 @@ ____________________________________________________________________________-->
193195
default, overriding whatever setting is present in
194196
<filename>postgresql.conf</filename> or has been received from the <command>postgres</command>
195197
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
198200
configuration values to be set.
199201
Settings set for all databases are overridden by database-specific settings
200202
attached to a role. Settings for specific databases or specific roles override
@@ -205,8 +207,8 @@ ____________________________________________________________________________-->
205207
只要改角色后续开始一个新会话,指定的值将会成为该会话的默认值,并且会覆盖
206208
<filename>postgresql.conf</filename>中存在的值或者从
207209
<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>不会导致新的配置值被设置。
210212
对于所有数据库设置的值会被附加到一个角色的数据库相关的设置所覆盖。特定数
211213
据库或角色的设置会覆盖为所有角色所作的设置。
212214
</para>
@@ -255,8 +257,10 @@ ____________________________________________________________________________-->
255257

256258
<varlistentry>
257259
<!--==========================orignal english content==========================
260+
<term><literal>CURRENT_ROLE</literal></term>
258261
<term><literal>CURRENT_USER</literal></term>
259262
____________________________________________________________________________-->
263+
<term><literal>CURRENT_ROLE</literal></term>
260264
<term><literal>CURRENT_USER</literal></term>
261265
<listitem>
262266
<!--==========================orignal english content==========================
@@ -365,12 +369,12 @@ ____________________________________________________________________________-->
365369
<!--==========================orignal english content==========================
366370
<para>
367371
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
369373
<command>CREATE ROLE</command> reference page.
370374
</para>
371375
____________________________________________________________________________-->
372376
<para>
373-
这些子句修改原来有<xref linkend="sql-createrole"/>
377+
这些子句修改原来有<link linkend="sql-createrole"><command>CREATE ROLE</command></link>
374378
设置的属性。更多信息请见
375379
<command>CREATE ROLE</command>参考页。
376380
</para>
@@ -451,15 +455,15 @@ ____________________________________________________________________________-->
451455
<!--==========================orignal english content==========================
452456
<para>
453457
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>
456460
do not process role-specific variable settings.
457461
</para>
458462
____________________________________________________________________________-->
459463
<para>
460464
角色相关的变量设置只在登录时生效,
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>不会处理角色
463467
相关的变量设置。
464468
</para>
465469

@@ -487,27 +491,27 @@ ____________________________________________________________________________-->
487491

488492
<!--==========================orignal english content==========================
489493
<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.
492496
</para>
493497
____________________________________________________________________________-->
494498
<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>移除一个角色。
497501
</para>
498502

499503
<!--==========================orignal english content==========================
500504
<para>
501505
<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>
504508
to do that.
505509
</para>
506510
____________________________________________________________________________-->
507511
<para>
508512
<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>来实现。
511515
</para>
512516

513517
<!--==========================orignal english content==========================

0 commit comments

Comments
 (0)