Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
3b7ca96c
Commit
3b7ca96c
authored
Mar 22, 2004
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up rather poor description of the difference between INHERITS and
LIKE. Per gripe from Patrick Samson.
parent
d81cd703
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
11 deletions
+25
-11
doc/src/sgml/ref/create_table.sgml
doc/src/sgml/ref/create_table.sgml
+25
-11
No files found.
doc/src/sgml/ref/create_table.sgml
View file @
3b7ca96c
<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/create_table.sgml,v 1.
79 2004/03/09 16:57:47 neilc
Exp $
$PostgreSQL: pgsql/doc/src/sgml/ref/create_table.sgml,v 1.
80 2004/03/22 16:18:50 tgl
Exp $
PostgreSQL documentation
-->
...
...
@@ -185,18 +185,20 @@ and <replaceable class="PARAMETER">table_constraint</replaceable> is:
<listitem>
<para>
The <literal>LIKE</literal> clause specifies a table from which
the new table automatically
inherits all column names, their data types, and
not-null constraints.
the new table automatically
copies all column names, their data types,
and their
not-null constraints.
</para>
<para>
Unlike <literal>INHERITS</literal>, the new table and inherited table
are complete decoupled after creation has been completed. Data inserted
into the new table will not be reflected into the parent table.
Unlike <literal>INHERITS</literal>, the new table and original table
are completely decoupled after creation is complete. Changes to the
original table will not be applied to the new table, and it is not
possible to include data of the new table in scans of the original
table.
</para>
<para>
Default expressions for the
inherited column definitions will only be included if
<literal>INCLUDING DEFAULTS</literal> is specified. The default is to exclud
e
default expressions.
Default expressions for the
copied column definitions will only be
included if <literal>INCLUDING DEFAULTS</literal> is specified. Th
e
default
is to exclude default
expressions.
</para>
</listitem>
</varlistentry>
...
...
@@ -207,12 +209,24 @@ and <replaceable class="PARAMETER">table_constraint</replaceable> is:
<para>
The optional <literal>INHERITS</> clause specifies a list of
tables from which the new table automatically inherits all
columns. If the same column name exists in more than one parent
columns.
</para>
<para>
Use of <literal>INHERITS</> creates a persistent relationship
between the new child table and its parent table(s). Schema
modifications to the parent(s) normally propagate to children
as well, and by default the data of the child table is included in
scans of the parent(s).
</para>
<para>
If the same column name exists in more than one parent
table, an error is reported unless the data types of the columns
match in each of the parent tables. If there is no conflict,
then the duplicate columns are merged to form a single column in
the new table. If the column name list of the new table
contains a column that is also inherited, the data type must
contains a column
name
that is also inherited, the data type must
likewise match the inherited column(s), and the column
definitions are merged into one. However, inherited and new
column declarations of the same name need not specify identical
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment