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
commit104a7dad363d9c3cff89c068ceadf2f1e5a9c8b9 (patch)
treecae56541b8657f0bfe39f64158389ff9feac08bf
parentbed05fff6fa400f0668c80e488458bc284ba5275 (diff)
downloadpostgresql-104a7dad363d9c3cff89c068ceadf2f1e5a9c8b9.tar.gz
postgresql-104a7dad363d9c3cff89c068ceadf2f1e5a9c8b9.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 d77312600f7..2d4ab85d450 100644
--- a/doc/src/sgml/advanced.sgml
+++ b/doc/src/sgml/advanced.sgml
@@ -616,7 +616,7 @@ CREATE TABLE cities (
);
CREATE TABLE capitals (
- state char(2)
+ state char(2) UNIQUE NOT NULL
) INHERITS (cities);
</programlisting>
</para>
@@ -630,7 +630,8 @@ CREATE TABLE capitals (
<type>text</type>, a native <productname>PostgreSQL</productname>
type for variable length character strings. The
<classname>capitals</classname> table has
- an extra column, <structfield>state</structfield>, which shows their states. In
+ an additional column, <structfield>state</structfield>, which shows its
+ state abbreviation. In
<productname>PostgreSQL</productname>, a table can inherit from
zero or more other tables.
</para>