Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
77fe28f3
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
77fe28f3
编写于
5月 03, 2001
作者:
T
Tom Lane
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Describe handling of multiply-inherited fields correctly.
上级
f2122d09
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
46 addition
and
18 deletion
+46
-18
doc/src/sgml/ref/create_table.sgml
doc/src/sgml/ref/create_table.sgml
+46
-18
未找到文件。
doc/src/sgml/ref/create_table.sgml
浏览文件 @
77fe28f3
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_table.sgml,v 1.4
1 2001/02/04 12:18:08 petere
Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_table.sgml,v 1.4
2 2001/05/03 17:50:55 tgl
Exp $
Postgres documentation
-->
...
...
@@ -26,7 +26,7 @@ Postgres documentation
CREATE [ TEMPORARY | TEMP ] TABLE <replaceable class="PARAMETER">table_name</replaceable> (
{ <replaceable class="PARAMETER">column_name</replaceable> <replaceable class="PARAMETER">type</replaceable> [ <replaceable class="PARAMETER">column_constraint</replaceable> [ ... ] ]
| <replaceable>table_constraint</replaceable> } [, ... ]
) [ INHERITS ( <replaceable>
inherited
_table</replaceable> [, ... ] ) ]
) [ INHERITS ( <replaceable>
parent
_table</replaceable> [, ... ] ) ]
where <replaceable class="PARAMETER">column_constraint</replaceable> can be:
[ CONSTRAINT <replaceable class="PARAMETER">constraint_name</replaceable> ]
...
...
@@ -99,17 +99,11 @@ and <replaceable class="PARAMETER">table_constraint</replaceable> can be:
</varlistentry>
<varlistentry>
<term><replaceable class="PARAMETER">
inherited
_table</replaceable></term>
<term><replaceable class="PARAMETER">
parent
_table</replaceable></term>
<listitem>
<para>
The optional INHERITS clause specifies a list of table
names from which this table automatically inherits all fields.
If any inherited field name appears more than once,
<productname>Postgres</productname>
reports an error.
<productname>Postgres</productname> automatically allows the created
table to inherit functions on tables above it in the inheritance
hierarchy.
</para>
</listitem>
</varlistentry>
...
...
@@ -258,20 +252,54 @@ ERROR: Relation '<replaceable class="parameter">table</replaceable>' already ex
existing datatype.
</para>
<para>
A table can have no more than 1600 columns (in practice, the
effective limit is lower because of tuple-length constraints).
A table cannot have the same name as a system catalog table.
</para>
</refsect1>
<refsect1 id="R1-SQL-INHERITSCLAUSE-1">
<title id="R1-SQL-INHERITSCLAUSE-1-TITLE">
INHERITS Clause
</title>
<para>
<synopsis>
INHERITS ( <replaceable class="PARAMETER">parent_table</replaceable> [, ... ] )
</synopsis>
</para>
<para>
The optional INHERITS
clause specifies a collection of table names from which this table
automatically inherits all fields. If any inherited field name
appears more than once, Postgres reports an error. Postgres automatically
allows the created table to inherit functions on tables above it in
the inheritance hierarchy. Inheritance of functions is done according
to the conventions of the Common Lisp Object System (CLOS).
clause specifies a list of table names from which the new table
automatically inherits all fields. If the same field name appears in
more than one parent table, Postgres reports an error unless the field
definitions match in each of the parent tables. If there is no
definition conflict, then the duplicate fields are merged to form a single
field of the new table. If the new table's own field list contains a
field name that is also inherited, this declaration must likewise match
the inherited field(s), and the field definitions are merged into one.
</para>
<para>
A table can have no more than 1600 columns (in practice, the
effective limit is lower because of tuple-length constraints).
A table cannot have the same name as a system catalog table.
Inherited and new field declarations of the same name must specify exactly
the same data type to avoid an error. They need not specify identical
constraints --- all constraints provided from any declaration are merged
together and all are applied to the new table. If the new table explicitly
specifies a default value for the field, this default overrides any
defaults from inherited declarations of the field. Otherwise, any parents
that specify default values for the field must all specify the same
default, or an error will be reported.
</para>
<para>
Postgres automatically allows the created table to inherit functions on
tables above it in the inheritance hierarchy; that is, if we create table
<literal>foo</literal> inheriting from <literal>bar</literal>, then
functions that accept the tuple type <literal>bar</literal> can also be
applied to instances of <literal>foo</literal>. (Currently, this works
reliably for functions on the first or only parent table, but not so well
for functions on additional parents.)
</para>
</refsect1>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录