aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2020-08-31 13:43:04 -0400
committerBruce Momjian <bruce@momjian.us>2020-08-31 13:43:04 -0400
commita76d83a00a9151dda2d1258100421ba493d6229a (patch)
treec9042bca8b12b21b9ef494550267c90899107b90
parentae6c6c255648fd57467a76770338d1553ebba34e (diff)
downloadpostgresql-a76d83a00a9151dda2d1258100421ba493d6229a.tar.gz
postgresql-a76d83a00a9151dda2d1258100421ba493d6229a.zip
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
-rw-r--r--doc/src/sgml/advanced.sgml5
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/src/sgml/advanced.sgml b/doc/src/sgml/advanced.sgml
index 1586021c2e7..7bead13c997 100644
--- a/doc/src/sgml/advanced.sgml
+++ b/doc/src/sgml/advanced.sgml
@@ -617,7 +617,7 @@ CREATE TABLE cities (
);
CREATE TABLE capitals (
- state char(2)
+ state char(2) UNIQUE NOT NULL
) INHERITS (cities);
</programlisting>
</para>
@@ -631,7 +631,8 @@ CREATE TABLE capitals (
<type>text</type>, a native <productname>PostgreSQL</productname>
type for variable length character strings. The
<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
zero or more other tables.
</para>