Skip to content

Commit 433b002

Browse files
authored
Merge pull request #282 from jingsam/alter_foregin_table
alter_foregin_table
2 parents a83e86e + abd2eb7 commit 433b002

File tree

1 file changed

+11
-53
lines changed

1 file changed

+11
-53
lines changed

postgresql/doc/src/sgml/ref/alter_foreign_table.sgml

Lines changed: 11 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ ALTER FOREIGN TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceab
6969
ENABLE TRIGGER [ <replaceable class="parameter">trigger_name</replaceable> | ALL | USER ]
7070
ENABLE REPLICA TRIGGER <replaceable class="parameter">trigger_name</replaceable>
7171
ENABLE ALWAYS TRIGGER <replaceable class="parameter">trigger_name</replaceable>
72-
SET WITH OIDS
7372
SET WITHOUT OIDS
7473
INHERIT <replaceable class="parameter">parent_table</replaceable>
7574
NO INHERIT <replaceable class="parameter">parent_table</replaceable>
@@ -107,7 +106,6 @@ ALTER FOREIGN TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceab
107106
ENABLE TRIGGER [ <replaceable class="parameter">trigger_name</replaceable> | ALL | USER ]
108107
ENABLE REPLICA TRIGGER <replaceable class="parameter">trigger_name</replaceable>
109108
ENABLE ALWAYS TRIGGER <replaceable class="parameter">trigger_name</replaceable>
110-
SET WITH OIDS
111109
SET WITHOUT OIDS
112110
INHERIT <replaceable class="parameter">parent_table</replaceable>
113111
NO INHERIT <replaceable class="parameter">parent_table</replaceable>
@@ -284,34 +282,13 @@ ____________________________________________________________________________-->
284282
</listitem>
285283
</varlistentry>
286284

287-
<varlistentry>
288-
<term><literal>SET WITH OIDS</literal></term>
289-
<listitem>
290-
<para>
291-
This form adds an <literal>oid</literal> system column to the
292-
table (see <xref linkend="ddl-system-columns"/>).
293-
It does nothing if the table already has OIDs.
294-
Unless the table's foreign-data wrapper supports OIDs, this column
295-
will simply read as zeroes.
296-
</para>
297-
298-
<para>
299-
Note that this is not equivalent to <literal>ADD COLUMN oid oid</literal>;
300-
that would add a normal column that happened to be named
301-
<literal>oid</literal>, not a system column.
302-
</para>
303-
</listitem>
304-
</varlistentry>
305-
306285
<varlistentry>
307286
<term><literal>SET WITHOUT OIDS</literal></term>
308287
<listitem>
309288
<para>
310-
This form removes the <literal>oid</literal> system column from the
311-
table. This is exactly equivalent to
312-
<literal>DROP COLUMN oid RESTRICT</literal>,
313-
except that it will not complain if there is already no
314-
<literal>oid</literal> column.
289+
Backward compatibility syntax for removing the <literal>oid</literal>
290+
system column. As <literal>oid</literal> system columns cannot be added
291+
anymore, this never has an effect.
315292
</para>
316293
</listitem>
317294
</varlistentry>
@@ -464,7 +441,7 @@ ____________________________________________________________________________-->
464441
</para>
465442
</listitem>
466443
</varlistentry>
467-
444+
468445
<varlistentry>
469446
<term>
470447
<literal>SET STORAGE</literal>
@@ -529,32 +506,13 @@ ____________________________________________________________________________-->
529506
</para>
530507
</listitem>
531508
</varlistentry>
532-
533-
<varlistentry>
534-
<term><literal>SET WITH OIDS</literal></term>
535-
<listitem>
536-
<para>
537-
这种形式为表增加一个<literal>oid</literal>系统列(见
538-
<xref linkend="ddl-system-columns"/>)。如果该表已经有 OID,则
539-
这种形式不会做任何事情。除非该表的外部数据包装器支持 OID,这个列
540-
将被简单地读作零。
541-
</para>
542-
543-
<para>
544-
注意这和<literal>ADD COLUMN oid oid</literal>并不等效,后者将增加
545-
一个刚好名字为<literal>oid</literal>的普通列而不是一个系统列。
546-
</para>
547-
</listitem>
548-
</varlistentry>
549509

550510
<varlistentry>
551511
<term><literal>SET WITHOUT OIDS</literal></term>
552512
<listitem>
553513
<para>
554-
这种形式从表移除<literal>oid</literal>系统列。这正好
555-
等效于<literal>DROP COLUMN oid RESTRICT</literal>,
556-
不过如果表上已经没有<literal>oid</literal>时它不会做出
557-
提示或者报错。
514+
向后兼容性语法,表示移除<literal>oid</literal>系统列。
515+
由于不能再为外部表添加<literal>oid</literal>系统列,此语句不再产生效用。
558516
</para>
559517
</listitem>
560518
</varlistentry>
@@ -598,7 +556,7 @@ ____________________________________________________________________________-->
598556
</para>
599557
</listitem>
600558
</varlistentry>
601-
559+
602560
<varlistentry>
603561
<term><literal>RENAME</literal></term>
604562
<listitem>
@@ -635,7 +593,7 @@ ____________________________________________________________________________-->
635593
动作都能被整合到一个多修改列表以便能被并行应用。例如,可以在一个
636594
命令中增加几个列并且/或者修改几个列的类型。
637595
</para>
638-
596+
639597
<!--==========================orignal english content==========================
640598
<para>
641599
If the command is written as <literal>ALTER FOREIGN TABLE IF EXISTS ...</literal>
@@ -774,7 +732,7 @@ ____________________________________________________________________________-->
774732
</para>
775733
</listitem>
776734
</varlistentry>
777-
735+
778736
<varlistentry>
779737
<!--==========================orignal english content==========================
780738
<term><replaceable class="parameter">table_constraint</replaceable></term>
@@ -905,7 +863,7 @@ ____________________________________________________________________________-->
905863
</para>
906864
</listitem>
907865
</varlistentry>
908-
866+
909867
<varlistentry>
910868
<!--==========================orignal english content==========================
911869
<term><replaceable class="parameter">parent_table</replaceable></term>
@@ -1075,7 +1033,7 @@ ____________________________________________________________________________-->
10751033
允许没有列的外部表。
10761034
</para>
10771035
</refsect1>
1078-
1036+
10791037
<refsect1>
10801038
<!--==========================orignal english content==========================
10811039
<title>See Also</title>

0 commit comments

Comments
 (0)