Skip to content

Commit fdee061

Browse files
committed
1. 合并彭老翻译的PG11.0
2. 升级11.0到11.2 3. 部分编译错误修改
1 parent 961374a commit fdee061

File tree

106 files changed

+42691
-26625
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+42691
-26625
lines changed

postgresql/doc/src/sgml/acronyms.sgml

Lines changed: 152 additions & 112 deletions
Large diffs are not rendered by default.

postgresql/doc/src/sgml/adminpack.sgml

Lines changed: 34 additions & 128 deletions
Original file line numberDiff line numberDiff line change
@@ -17,38 +17,40 @@ ____________________________________________________________________________-->
1717

1818
<!--==========================orignal english content==========================
1919
<para>
20-
<filename>adminpack</> provides a number of support functions which
21-
<application>pgAdmin</> and other administration and management tools can
20+
<filename>adminpack</filename> provides a number of support functions which
21+
<application>pgAdmin</application> and other administration and management tools can
2222
use to provide additional functionality, such as remote management
2323
of server log files.
24-
Use of all these functions is restricted to superusers.
24+
Use of all these functions is only allowed to the superuser by default but may be
25+
allowed to other users by using the <command>GRANT</command> command.
2526
</para>
2627
____________________________________________________________________________-->
2728
<para>
28-
<filename>adminpack</filename>提供了一些支持函数,<application>pgAdmin</application>和其他管理工具会用这些函数来提供额外的功能,例如服务器日志文件的远程管理。只有超级用户才能使用全部这些函数
29+
<filename>adminpack</filename> 提供了一些支持函数,<application>pgAdmin</application> 和其他管理工具会用这些函数来提供额外的功能,例如服务器日志文件的远程管理。所有这些函数默认只允许由超级用户使用,但是可以通过使用 <command>GRANT</command> 命令允许其他用户使用
2930
</para>
3031

3132
<!--==========================orignal english content==========================
3233
<para>
33-
The functions shown in <xref linkend="functions-adminpack-table"> provide
34+
The functions shown in <xref linkend="functions-adminpack-table"/> provide
3435
write access to files on the machine hosting the server. (See also the
35-
functions in <xref linkend="functions-admin-genfile-table">, which
36+
functions in <xref linkend="functions-admin-genfile-table"/>, which
3637
provide read-only access.)
37-
Only files within the database cluster directory can be accessed, but
38-
either a relative or absolute path is allowable.
38+
Only files within the database cluster directory can be accessed, unless the
39+
user is a superuser or given one of the pg_read_server_files, or pg_write_server_files
40+
roles, as appropriate for the function, but either a relative or absolute path is
41+
allowable.
3942
</para>
4043
____________________________________________________________________________-->
4144
<para>
4245
<xref linkend="functions-adminpack-table"/>中展示的函数提供了向运行
4346
着服务器的机器上的文件进行写入的途径(另见
4447
<xref linkend="functions-admin-genfile-table"/>中的函数,它们提供了
45-
只读的访问途径)。只有位于数据库集簇目录中的文件才能被访问,不过相对
46-
路径和绝对路径都可以使用。
48+
只读的访问途径)。对于这些函数,只有位于数据库集簇目录中的文件才能被访问(除非用户是一个超级用户或者被指定了 pg_read_server_files 或者 pg_write_server_files 角色之一),不过允许使用相对路径和绝对路径。
4749
</para>
4850

4951
<table id="functions-adminpack-table">
5052
<!--==========================orignal english content==========================
51-
<title><filename>adminpack</> Functions</title>
53+
<title><filename>adminpack</filename> Functions</title>
5254
____________________________________________________________________________-->
5355
<title><filename>adminpack</filename> 函数</title>
5456
<tgroup cols="3">
@@ -115,15 +117,15 @@ ____________________________________________________________________________-->
115117
<entry><function>pg_catalog.pg_logdir_ls()</function></entry>
116118
<entry><type>setof record</type></entry>
117119
<entry>
118-
List the log files in the <varname>log_directory</> directory
120+
List the log files in the <varname>log_directory</varname> directory
119121
</entry>
120122
</row>
121123
____________________________________________________________________________-->
122124
<row>
123125
<entry><function>pg_catalog.pg_logdir_ls()</function></entry>
124126
<entry><type>setof record</type></entry>
125127
<entry>
126-
列出在<varname>log_directory</varname>目录中的日志文件
128+
列出在 <varname>log_directory</varname> 目录中的日志文件
127129
</entry>
128130
</row>
129131
</tbody>
@@ -140,17 +142,15 @@ ____________________________________________________________________________-->
140142
</indexterm>
141143
<!--==========================orignal english content==========================
142144
<para>
143-
<function>pg_file_write</> writes the specified <parameter>data</> into
144-
the file named by <parameter>filename</>. If <parameter>append</> is
145-
false, the file must not already exist. If <parameter>append</> is true,
145+
<function>pg_file_write</function> writes the specified <parameter>data</parameter> into
146+
the file named by <parameter>filename</parameter>. If <parameter>append</parameter> is
147+
false, the file must not already exist. If <parameter>append</parameter> is true,
146148
the file can already exist, and will be appended to if so.
147149
Returns the number of bytes written.
148150
</para>
149151
____________________________________________________________________________-->
150152
<para>
151-
<function>pg_file_write</function>把指定的<parameter>data</parameter>写入到由
152-
<parameter>filename</parameter>命名的文件中。如果<parameter>append</parameter>
153-
为假,文件不能已经存在。如果<parameter>append</parameter>为真,该文件
153+
<function>pg_file_write</function> 把指定的 <parameter>data</parameter> 写入到由 <parameter>filename</parameter> 命名的文件中。如果 <parameter>append</parameter> 为假,文件不能已经存在。如果 <parameter>append</parameter> 为真,该文件
154154
可能已经存在,并且如果存在就会被追加。这个函数返回写入的字节数。
155155
</para>
156156

@@ -164,15 +164,15 @@ ____________________________________________________________________________-->
164164
</indexterm>
165165
<!--==========================orignal english content==========================
166166
<para>
167-
<function>pg_file_rename</> renames a file. If <parameter>archivename</>
168-
is omitted or NULL, it simply renames <parameter>oldname</>
169-
to <parameter>newname</> (which must not already exist).
170-
If <parameter>archivename</> is provided, it first
171-
renames <parameter>newname</> to <parameter>archivename</> (which must
172-
not already exist), and then renames <parameter>oldname</>
173-
to <parameter>newname</>. In event of failure of the second rename step,
174-
it will try to rename <parameter>archivename</> back
175-
to <parameter>newname</> before reporting the error.
167+
<function>pg_file_rename</function> renames a file. If <parameter>archivename</parameter>
168+
is omitted or NULL, it simply renames <parameter>oldname</parameter>
169+
to <parameter>newname</parameter> (which must not already exist).
170+
If <parameter>archivename</parameter> is provided, it first
171+
renames <parameter>newname</parameter> to <parameter>archivename</parameter> (which must
172+
not already exist), and then renames <parameter>oldname</parameter>
173+
to <parameter>newname</parameter>. In event of failure of the second rename step,
174+
it will try to rename <parameter>archivename</parameter> back
175+
to <parameter>newname</parameter> before reporting the error.
176176
Returns true on success, false if the source file(s) are not present or
177177
not writable; other cases throw errors.
178178
</para>
@@ -200,9 +200,9 @@ ____________________________________________________________________________-->
200200
</indexterm>
201201
<!--==========================orignal english content==========================
202202
<para>
203-
<function>pg_file_unlink</> removes the specified file.
203+
<function>pg_file_unlink</function> removes the specified file.
204204
Returns true on success, false if the specified file is not present
205-
or the <function>unlink()</> call fails; other cases throw errors.
205+
or the <function>unlink()</function> call fails; other cases throw errors.
206206
</para>
207207
____________________________________________________________________________-->
208208
<para>
@@ -221,10 +221,10 @@ ____________________________________________________________________________-->
221221
</indexterm>
222222
<!--==========================orignal english content==========================
223223
<para>
224-
<function>pg_logdir_ls</> returns the start timestamps and path
225-
names of all the log files in the <xref linkend="guc-log-directory">
226-
directory. The <xref linkend="guc-log-filename"> parameter must have its
227-
default setting (<literal>postgresql-%Y-%m-%d_%H%M%S.log</>) to use this
224+
<function>pg_logdir_ls</function> returns the start timestamps and path
225+
names of all the log files in the <xref linkend="guc-log-directory"/>
226+
directory. The <xref linkend="guc-log-filename"/> parameter must have its
227+
default setting (<literal>postgresql-%Y-%m-%d_%H%M%S.log</literal>) to use this
228228
function.
229229
</para>
230230
____________________________________________________________________________-->
@@ -235,98 +235,4 @@ ____________________________________________________________________________-->
235235
<literal>postgresql-%Y-%m-%d_%H%M%S.log</literal>)。
236236
</para>
237237

238-
<!--==========================orignal english content==========================
239-
<para>
240-
The functions shown
241-
in <xref linkend="functions-adminpack-deprecated-table"> are deprecated
242-
and should not be used in new applications; instead use those shown
243-
in <xref linkend="functions-admin-signal-table">
244-
and <xref linkend="functions-admin-genfile-table">. These functions are
245-
provided in <filename>adminpack</> only for compatibility with old
246-
versions of <application>pgAdmin</>.
247-
</para>
248-
____________________________________________________________________________-->
249-
<para>
250-
The functions shown
251-
in
252-
<xref linkend="functions-adminpack-deprecated-table"/>中展示的函数
253-
已经被废弃,新的应用不应该使用它们,而是使用
254-
<xref linkend="functions-admin-signal-table"/>和
255-
<xref linkend="functions-admin-genfile-table"/>中所示的那些函数。在
256-
<filename>adminpack</filename>中提供这些函数只是为了兼容旧版本的
257-
<application>pgAdmin</application>。
258-
</para>
259-
260-
<table id="functions-adminpack-deprecated-table">
261-
<!--==========================orignal english content==========================
262-
<title>Deprecated <filename>adminpack</> Functions</title>
263-
____________________________________________________________________________-->
264-
<title>废弃的 <filename>adminpack</filename> 函数</title>
265-
<tgroup cols="3">
266-
<thead>
267-
<!--==========================orignal english content==========================
268-
<row><entry>Name</entry> <entry>Return Type</entry> <entry>Description</entry>
269-
</row>
270-
____________________________________________________________________________-->
271-
<row><entry>名称</entry> <entry>返回类型</entry> <entry>描述</entry>
272-
</row>
273-
</thead>
274-
275-
<tbody>
276-
<!--==========================orignal english content==========================
277-
<row>
278-
<entry><function>pg_catalog.pg_file_read(filename text, offset bigint, nbytes bigint)</function></entry>
279-
<entry><type>text</type></entry>
280-
<entry>
281-
Alternate name for <function>pg_read_file()</>
282-
</entry>
283-
</row>
284-
____________________________________________________________________________-->
285-
<row>
286-
<entry><function>pg_catalog.pg_file_read(filename text, offset bigint, nbytes bigint)</function></entry>
287-
<entry><type>text</type></entry>
288-
<entry>
289-
<function>pg_read_file()</function>的另一个名字
290-
</entry>
291-
</row>
292-
<!--==========================orignal english content==========================
293-
<row>
294-
<entry><function>pg_catalog.pg_file_length(filename text)</function></entry>
295-
<entry><type>bigint</type></entry>
296-
<entry>
297-
Same as <structfield>size</> column returned
298-
by <function>pg_stat_file()</>
299-
</entry>
300-
</row>
301-
____________________________________________________________________________-->
302-
<row>
303-
<entry><function>pg_catalog.pg_file_length(filename text)</function></entry>
304-
<entry><type>bigint</type></entry>
305-
<entry>
306-
和<function>pg_stat_file()</function>返回的<structfield>size</structfield>列一样
307-
</entry>
308-
</row>
309-
<!--==========================orignal english content==========================
310-
<row>
311-
<entry><function>pg_catalog.pg_logfile_rotate()</function></entry>
312-
<entry><type>integer</type></entry>
313-
<entry>
314-
Alternate name for <function>pg_rotate_logfile()</>, but note that it
315-
returns integer 0 or 1 rather than <type>boolean</type>
316-
</entry>
317-
</row>
318-
____________________________________________________________________________-->
319-
<row>
320-
<entry><function>pg_catalog.pg_logfile_rotate()</function></entry>
321-
<entry><type>integer</type></entry>
322-
<entry>
323-
Alternate name for
324-
<function>pg_rotate_logfile()</function>的另一个名字,但是要注意它返回
325-
整数 0 或者 1 而不是<type>boolean</type>
326-
</entry>
327-
</row>
328-
</tbody>
329-
</tgroup>
330-
</table>
331-
332238
</sect1>

0 commit comments

Comments
 (0)