Skip to content

Commit 56e1183

Browse files
author
gpobs
committed
Update ref/create_table_as.sgml-200602
——row45至46,调整英文内容为: [ USING <replaceable class="parameter">method</replaceable> ] [ WITH ( <replaceable class="parameter">storage_parameter</replaceable> [= <replaceable class="parameter">value</replaceable>] [, ... ] ) | WITHOUT OIDS ] ——row56至57,调整中文内容为: [ USING <replaceable class="parameter">method</replaceable> ] [ WITH ( <replaceable class="parameter">storage_parameter</replaceable> [= <replaceable class="parameter">value</replaceable>] [, ... ] ) | WITHOUT OIDS ] ——row230至251,增加英文和中文内容为: <varlistentry> <!--==========================orignal english content========================== <term><literal>USING <replaceable class="parameter">method</replaceable></literal></term> ____________________________________________________________________________--> <term><literal>USING <replaceable class="parameter">method</replaceable></literal></term> <listitem> <!--==========================orignal english content========================== <para> This optional clause specifies the table access method to use to store the contents for the new table; the method needs be an access method of type <literal>TABLE</literal>. See <xref linkend="tableam"/> for more information. If this option is not specified, the default table access method is chosen for the new table. See <xref linkend="guc-default-table-access-method"/> for more information. </para> ____________________________________________________________________________--> <para> 这个可选的子句指定了用于存储新表内容的表访问方法;该方法需要是一个类型 <literal>TABLE</literal>的访问方法。详见<xref linkend="tableam"/>。 如果没有指定这个选项,则选择新表的默认表访问方法。详见<xref linkend="guc-default-table-access-method"/>。 </para> </listitem> </varlistentry> ——row264至267,调整英文内容为: information. For backward-compatibility the <literal>WITH</literal> clause for a table can also include <literal>OIDS=FALSE</literal> to specify that rows of the new table should contain no OIDs (object identifiers), <literal>OIDS=TRUE</literal> is not supported anymore. ——row274,调整中文内容为: 为了向后兼容,表的<literal>WITH</literal>子句也能包含<literal>OIDS=FALSE</literal>来指定新表的行将不包含OID(对象标识符)。<literal>OIDS=TRUE</literal>不再支持。 ——row279,删除英文和中文内容为: <!--==========================orignal english content========================== <term><literal>WITH OIDS</literal></term> ____________________________________________________________________________--> <term><literal>WITH OIDS</literal></term> ——row287至289,调整英文内容为: This is backward-compatible syntax for declaring a table <literal>WITHOUT OIDS</literal>, creating a table <literal>WITH OIDS</literal> is not supported anymore. ——row293,调整中文内容为: 这是向后兼容的语法,用于声明表<literal>WITHOUT OIDS</literal>,创建表<literal>WITH OIDS</literal>不再被支持。 ——row474,删除英文和中文内容为: <!--==========================orignal english content========================== <para> The <command>CREATE TABLE AS</command> command allows the user to explicitly specify whether OIDs should be included. If the presence of OIDs is not explicitly specified, the <xref linkend="guc-default-with-oids"/> configuration variable is used. </para> ____________________________________________________________________________--> <para> <command>CREATE TABLE AS</command>命令允许用户显式地指定 是否应该包括 OID。如果没有显式地指定 OID 的存在,将使用 <xref linkend="guc-default-with-oids"/>配置变量来判断。 </para> ——row529,调整英文内容为: prepared statement. The new table will be dropped at commit: ——row540,调整中文内容为: 它仅由表<literal>films</literal>中最近的项组成,使用准备好的声明。新表将在提交时被丢弃: ——row534,调整英文内容为: CREATE TEMP TABLE films_recent ON COMMIT DROP AS ——row545,调整中文内容为: CREATE TEMP TABLE films_recent ON COMMIT DROP AS ——row588,调整英文内容为: extension; storage parameters are not in the standard. ——row630,调整中文内容为: 标准中没有存储参数。
1 parent 31401f3 commit 56e1183

File tree

1 file changed

+43
-47
lines changed

1 file changed

+43
-47
lines changed

postgresql/doc/src/sgml/ref/create_table_as.sgml

Lines changed: 43 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ ____________________________________________________________________________-->
4242
<synopsis>
4343
CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE [ IF NOT EXISTS ] <replaceable>table_name</replaceable>
4444
[ (<replaceable>column_name</replaceable> [, ...] ) ]
45-
[ WITH ( <replaceable class="parameter">storage_parameter</replaceable> [= <replaceable class="parameter">value</replaceable>] [, ... ] ) | WITH OIDS | WITHOUT OIDS ]
45+
[ USING <replaceable class="parameter">method</replaceable> ]
46+
[ WITH ( <replaceable class="parameter">storage_parameter</replaceable> [= <replaceable class="parameter">value</replaceable>] [, ... ] ) | WITHOUT OIDS ]
4647
[ ON COMMIT { PRESERVE ROWS | DELETE ROWS | DROP } ]
4748
[ TABLESPACE <replaceable class="parameter">tablespace_name</replaceable> ]
4849
AS <replaceable>query</replaceable>
@@ -52,7 +53,8 @@ ____________________________________________________________________________-->
5253
<synopsis>
5354
CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE [ IF NOT EXISTS ] <replaceable>table_name</replaceable>
5455
[ (<replaceable>column_name</replaceable> [, ...] ) ]
55-
[ WITH ( <replaceable class="parameter">storage_parameter</replaceable> [= <replaceable class="parameter">value</replaceable>] [, ... ] ) | WITH OIDS | WITHOUT OIDS ]
56+
[ USING <replaceable class="parameter">method</replaceable> ]
57+
[ WITH ( <replaceable class="parameter">storage_parameter</replaceable> [= <replaceable class="parameter">value</replaceable>] [, ... ] ) | WITHOUT OIDS ]
5658
[ ON COMMIT { PRESERVE ROWS | DELETE ROWS | DROP } ]
5759
[ TABLESPACE <replaceable class="parameter">tablespace_name</replaceable> ]
5860
AS <replaceable>query</replaceable>
@@ -169,7 +171,7 @@ ____________________________________________________________________________-->
169171
</para>
170172
</listitem>
171173
</varlistentry>
172-
174+
173175
<varlistentry>
174176
<!--==========================orignal english content==========================
175177
<term><literal>IF NOT EXISTS</literal></term>
@@ -225,6 +227,29 @@ ____________________________________________________________________________-->
225227
</listitem>
226228
</varlistentry>
227229

230+
<varlistentry>
231+
<!--==========================orignal english content==========================
232+
<term><literal>USING <replaceable class="parameter">method</replaceable></literal></term>
233+
____________________________________________________________________________-->
234+
<term><literal>USING <replaceable class="parameter">method</replaceable></literal></term>
235+
<listitem>
236+
<!--==========================orignal english content==========================
237+
<para>
238+
This optional clause specifies the table access method to use to store
239+
the contents for the new table; the method needs be an access method of
240+
type <literal>TABLE</literal>. See <xref linkend="tableam"/> for more
241+
information. If this option is not specified, the default table access
242+
method is chosen for the new table. See <xref
243+
linkend="guc-default-table-access-method"/> for more information.
244+
</para>
245+
____________________________________________________________________________-->
246+
<para>
247+
这个可选的子句指定了用于存储新表内容的表访问方法;该方法需要是一个类型 <literal>TABLE</literal>的访问方法。详见<xref linkend="tableam"/>。
248+
如果没有指定这个选项,则选择新表的默认表访问方法。详见<xref linkend="guc-default-table-access-method"/>。
249+
</para>
250+
</listitem>
251+
</varlistentry>
252+
228253
<varlistentry>
229254
<!--==========================orignal english content==========================
230255
<term><literal>WITH ( <replaceable class="parameter">storage_parameter</replaceable> [= <replaceable class="parameter">value</replaceable>] [, ... ] )</literal></term>
@@ -236,49 +261,36 @@ ____________________________________________________________________________-->
236261
This clause specifies optional storage parameters for the new table;
237262
see <xref linkend="sql-createtable-storage-parameters"
238263
endterm="sql-createtable-storage-parameters-title"/> for more
239-
information. The <literal>WITH</literal> clause
240-
can also include <literal>OIDS=TRUE</literal> (or just <literal>OIDS</literal>)
241-
to specify that rows of the new table
242-
should have OIDs (object identifiers) assigned to them, or
243-
<literal>OIDS=FALSE</literal> to specify that the rows should not have OIDs.
244-
See <xref linkend="sql-createtable"/> for more information.
264+
information. For backward-compatibility the <literal>WITH</literal>
265+
clause for a table can also include <literal>OIDS=FALSE</literal> to
266+
specify that rows of the new table should contain no OIDs (object
267+
identifiers), <literal>OIDS=TRUE</literal> is not supported anymore.
245268
</para>
246269
____________________________________________________________________________-->
247270
<para>
248271
这个子句为新表指定可选的存储参数,详见
249272
<xref linkend="sql-createtable-storage-parameters"
250273
endterm="sql-createtable-storage-parameters-title"/>。
251-
<literal>WITH</literal>子句也能包括<literal>OIDS=TRUE</literal>(或者只是
252-
<literal>OIDS</literal>)来指定新表的行应该被分配 OID (对象标识符),
253-
或者包括<literal>OIDS=FALSE</literal>来指定行没有 OID。详见
254-
<xref linkend="sql-createtable"/>。
274+
为了向后兼容,表的<literal>WITH</literal>子句也能包含<literal>OIDS=FALSE</literal>来指定新表的行将不包含OID(对象标识符)。<literal>OIDS=TRUE</literal>不再支持。
255275
</para>
256276
</listitem>
257277
</varlistentry>
258278

259279
<varlistentry>
260-
<!--==========================orignal english content==========================
261-
<term><literal>WITH OIDS</literal></term>
262-
____________________________________________________________________________-->
263-
<term><literal>WITH OIDS</literal></term>
264280
<!--==========================orignal english content==========================
265281
<term><literal>WITHOUT OIDS</literal></term>
266282
____________________________________________________________________________-->
267283
<term><literal>WITHOUT OIDS</literal></term>
268284
<listitem>
269285
<!--==========================orignal english content==========================
270286
<para>
271-
These are obsolescent syntaxes equivalent to <literal>WITH (OIDS)</literal>
272-
and <literal>WITH (OIDS=FALSE)</literal>, respectively. If you wish to give
273-
both an <literal>OIDS</literal> setting and storage parameters, you must use
274-
the <literal>WITH ( ... )</literal> syntax; see above.
287+
This is backward-compatible syntax for declaring a table
288+
<literal>WITHOUT OIDS</literal>, creating a table <literal>WITH
289+
OIDS</literal> is not supported anymore.
275290
</para>
276291
____________________________________________________________________________-->
277292
<para>
278-
这些是分别等效于<literal>WITH (OIDS)</literal>和
279-
<literal>WITH (OIDS=FALSE)</literal>的即将过时的语法。如果你希望同时
280-
给出<literal>OIDS</literal>设置和存储参数,你必须使用
281-
<literal>WITH ( ... )</literal>语法,见上文。
293+
这是向后兼容的语法,用于声明表<literal>WITHOUT OIDS</literal>,创建表<literal>WITH OIDS</literal>不再被支持。
282294
</para>
283295
</listitem>
284296
</varlistentry>
@@ -460,21 +472,6 @@ ____________________________________________________________________________-->
460472
进一步,<command>CREATE TABLE AS</command>提供了
461473
<command>SELECT INTO</command>的功能的一个超集。
462474
</para>
463-
464-
<!--==========================orignal english content==========================
465-
<para>
466-
The <command>CREATE TABLE AS</command> command allows the user to
467-
explicitly specify whether OIDs should be included. If the
468-
presence of OIDs is not explicitly specified,
469-
the <xref linkend="guc-default-with-oids"/> configuration variable is
470-
used.
471-
</para>
472-
____________________________________________________________________________-->
473-
<para>
474-
<command>CREATE TABLE AS</command>命令允许用户显式地指定
475-
是否应该包括 OID。如果没有显式地指定 OID 的存在,将使用
476-
<xref linkend="guc-default-with-oids"/>配置变量来判断。
477-
</para>
478475
</refsect1>
479476

480477
<refsect1>
@@ -529,24 +526,23 @@ CREATE TABLE films2 AS
529526
<para>
530527
Create a new temporary table <literal>films_recent</literal>, consisting of
531528
only recent entries from the table <literal>films</literal>, using a
532-
prepared statement. The new table has OIDs and will be dropped at commit:
529+
prepared statement. The new table will be dropped at commit:
533530

534531
<programlisting>
535532
PREPARE recentfilms(date) AS
536533
SELECT * FROM films WHERE date_prod &gt; $1;
537-
CREATE TEMP TABLE films_recent WITH (OIDS) ON COMMIT DROP AS
534+
CREATE TEMP TABLE films_recent ON COMMIT DROP AS
538535
EXECUTE recentfilms('2002-01-01');
539536
</programlisting></para>
540537
____________________________________________________________________________-->
541538
<para>
542539
用一个预备语句创建一个新的临时表<literal>films_recent</literal>,
543-
它仅由表<literal>films</literal>中最近的项组成。新表有 OID
544-
并且将在提交时被删除:
540+
它仅由表<literal>films</literal>中最近的项组成,使用准备好的声明。新表将在提交时被丢弃:
545541

546542
<programlisting>
547543
PREPARE recentfilms(date) AS
548544
SELECT * FROM films WHERE date_prod &gt; $1;
549-
CREATE TEMP TABLE films_recent WITH (OIDS) ON COMMIT DROP AS
545+
CREATE TEMP TABLE films_recent ON COMMIT DROP AS
550546
EXECUTE recentfilms('2002-01-01');
551547
</programlisting></para>
552548
</refsect1>
@@ -589,7 +585,7 @@ ____________________________________________________________________________-->
589585
<listitem>
590586
<para>
591587
The <literal>WITH</literal> clause is a <productname>PostgreSQL</productname>
592-
extension; neither storage parameters nor OIDs are in the standard.
588+
extension; storage parameters are not in the standard.
593589
</para>
594590
</listitem>
595591

@@ -631,7 +627,7 @@ ____________________________________________________________________________-->
631627
<para>
632628
<literal>WITH</literal>子句是一种
633629
<productname>PostgreSQL</productname>扩展,
634-
标准中既没有存储参数也没有 OID
630+
标准中没有存储参数
635631
</para>
636632
</listitem>
637633

0 commit comments

Comments
 (0)