mirror of
https://github.com/postgres/postgres.git
synced 2025-05-03 22:24:49 +03:00
docs: improve 'capitals' inheritance example
Adds constraints and improves wording. Reported-by: 2552891@gmail.com Discussion: https://postgr.es/m/159586122762.680.1361378513036616007@wrigleys.postgresql.org Backpatch-through: 9.5
This commit is contained in:
parent
1b694b70c0
commit
d9f488dc76
@ -616,7 +616,7 @@ CREATE TABLE cities (
|
|||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE capitals (
|
CREATE TABLE capitals (
|
||||||
state char(2)
|
state char(2) UNIQUE NOT NULL
|
||||||
) INHERITS (cities);
|
) INHERITS (cities);
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
@ -630,7 +630,8 @@ CREATE TABLE capitals (
|
|||||||
<type>text</type>, a native <productname>PostgreSQL</productname>
|
<type>text</type>, a native <productname>PostgreSQL</productname>
|
||||||
type for variable length character strings. The
|
type for variable length character strings. The
|
||||||
<classname>capitals</> table has
|
<classname>capitals</> table has
|
||||||
an extra column, <structfield>state</>, which shows their states. In
|
an additional column, <structfield>state</>, which shows its
|
||||||
|
state abbreviation. In
|
||||||
<productname>PostgreSQL</productname>, a table can inherit from
|
<productname>PostgreSQL</productname>, a table can inherit from
|
||||||
zero or more other tables.
|
zero or more other tables.
|
||||||
</para>
|
</para>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user