From 4d93773798d68915b3b7d870bdceae9869b62f03 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Mon, 31 Aug 2020 13:43:04 -0400 Subject: [PATCH] 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 --- doc/src/sgml/advanced.sgml | 5 +++-- 1 file 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); @@ -631,7 +631,8 @@ CREATE TABLE capitals ( text, a native PostgreSQL type for variable length character strings. The capitals table has - an extra column, state, which shows their states. In + an additional column, state, which shows its + state abbreviation. In PostgreSQL, a table can inherit from zero or more other tables.