commit 508dc751e2ed60e9ba6bb4849e9320543ae0f134
Author: David G. Johnston <david.g.johnston@gmail.com>
Date:   Tue Jul 14 15:38:30 2020 +0000

    Link CREATE/DROP TYPE and DOMAIN to the Glossary
    
    We have a generic term that encompasses tables, views, etc...,
    "relation".  Introduce the term "type definition" to encompass
    base, composite, domain, etc... types.  The individual types
    are the rows on pg_type while type definition represents the
    allowed values for the pg_type.typtype column (restricted to
    user-creatable ones).
    
    Update the TYPE and DOMAIN pages to refer to these
    glossary entries.

diff --git a/doc/src/sgml/glossary.sgml b/doc/src/sgml/glossary.sgml
index 25b03f3b37..c517ff5b4a 100644
--- a/doc/src/sgml/glossary.sgml
+++ b/doc/src/sgml/glossary.sgml
@@ -1612,6 +1612,30 @@
    </glossdef>
   </glossentry>
 
+  <glossentry id="glossary-type">
+   <glossterm>Type</glossterm>
+   <glossdef>
+    <para>
+     All data stored within the database is typed.  Each type has both a name, and associated
+     properties, as well as an overarching Type, of which there are two variations. Extensible
+     types can created by users and comprise of: base, composite, domain, enum, and range. There
+     are also the system-only pseudo-types.  Type records are stored in pg_type and the
+     overarching type is found in pg_type.typtype.
+    </para>
+   </glossdef>
+  </glossentry>  
+
+  <glossentry id="glossary-type-definition">
+   <glossterm>Type Definition</glossterm>
+   <glossdef>
+    <para>
+     Collective term for the various <glossterm linkend="glossary-type">Type</glossterm>
+     variants that are allowed for pg_type.typtype catalog table column values;
+     specifically, ones that are extensible.
+    </para>
+   </glossdef>
+  </glossentry>
+
   <glossentry id="glossary-unique-constraint">
    <glossterm>Unique constraint</glossterm>
    <glossdef>
diff --git a/doc/src/sgml/ref/create_domain.sgml b/doc/src/sgml/ref/create_domain.sgml
index 81a8924926..00e1544ac8 100644
--- a/doc/src/sgml/ref/create_domain.sgml
+++ b/doc/src/sgml/ref/create_domain.sgml
@@ -38,8 +38,8 @@ CREATE DOMAIN <replaceable class="parameter">name</replaceable> [ AS ] <replacea
 
   <para>
    <command>CREATE DOMAIN</command> creates a new domain.  A domain is
-   essentially a data type with optional constraints (restrictions on
-   the allowed set of values).
+   essentially a data <glossterm linkend="glossary-type">type</glossterm>
+   with optional constraints (restrictions on the allowed set of values).
    The user who defines a domain becomes its owner.
   </para>
 
@@ -64,6 +64,13 @@ CREATE DOMAIN <replaceable class="parameter">name</replaceable> [ AS ] <replacea
    To be able to create a domain, you must have <literal>USAGE</literal>
    privilege on the underlying type.
   </para>
+  
+  <para>
+   This emulates the functionality provided by 
+   <xref linkend="sql-createtype"/> but sets the created object's
+   <glossterm linkend="glossary-type-definition">type definition</glossterm>
+   to domain.
+  </para>
  </refsect1>
 
  <refsect1>
diff --git a/doc/src/sgml/ref/create_type.sgml b/doc/src/sgml/ref/create_type.sgml
index 111f8e65d2..bbeeca7317 100644
--- a/doc/src/sgml/ref/create_type.sgml
+++ b/doc/src/sgml/ref/create_type.sgml
@@ -64,9 +64,10 @@ CREATE TYPE <replaceable class="parameter">name</replaceable>
   <title>Description</title>
 
   <para>
-   <command>CREATE TYPE</command> registers a new data type for use in
-   the current database.  The user who defines a type becomes its
-   owner.
+   <command>CREATE TYPE</command> registers a new data
+   <glossterm linkend="glossary-type">type</glossterm>
+   for use in the current database.  The user who defines
+   a type becomes its owner.
   </para>
 
   <para>
@@ -83,7 +84,10 @@ CREATE TYPE <replaceable class="parameter">name</replaceable>
    syntax synopsis above.  They respectively create a <firstterm>composite
    type</firstterm>, an <firstterm>enum type</firstterm>, a <firstterm>range type</firstterm>, a
    <firstterm>base type</firstterm>, or a <firstterm>shell type</firstterm>.  The first four
-   of these are discussed in turn below.  A shell type is simply a placeholder
+   of these are discussed in turn below and represent four of the five
+   <glossterm linkend="glossary-type-definition">type definition</glossterm>s,
+   with the fifth, domain, created using the <xref linkend="sql-createdomain"/> command.
+   A shell type is simply a placeholder
    for a type to be defined later; it is created by issuing <command>CREATE
    TYPE</command> with no parameters except for the type name.  Shell types
    are needed as forward references when creating range types and base types,
diff --git a/doc/src/sgml/ref/drop_domain.sgml b/doc/src/sgml/ref/drop_domain.sgml
index cba665fcc7..8375dd5849 100644
--- a/doc/src/sgml/ref/drop_domain.sgml
+++ b/doc/src/sgml/ref/drop_domain.sgml
@@ -29,10 +29,13 @@ DROP DOMAIN [ IF EXISTS ] <replaceable class="parameter">name</replaceable> [, .
   <title>Description</title>
 
   <para>
-   <command>DROP DOMAIN</command> removes a domain.  Only the owner of
-   a domain can remove it.  This duplicates the functionality provided by 
-   <xref linkend="sql-droptype"/> but restricts the object type to domain.
-
+   <command>DROP DOMAIN</command> removes a domain
+   <glossterm linkend="glossary-type">type</glossterm>.
+   Only the owner of a domain can remove it.
+   This duplicates the functionality provided by 
+   <xref linkend="sql-droptype"/> but restricts the object
+   <glossterm linkend="glossary-type-definition">type definition</glossterm>
+   to domain.
   </para>
  </refsect1>
 
@@ -45,7 +48,9 @@ DROP DOMAIN [ IF EXISTS ] <replaceable class="parameter">name</replaceable> [, .
     <listitem>
      <para>
       This parameter instructs <productname>PostgreSQL</productname> to search 
-      for the first instance of any type definition with the provided name.
+      for the first instance of any
+      <glossterm linkend="glossary-type-definition">type definition</glossterm>
+      with the provided name.
       If no type definition is found a notice is issued and the command ends.
       If a type definition is found then one of two things will happen:
       if the type definition is a domain it is dropped, otherwise the command fails.      
diff --git a/doc/src/sgml/ref/drop_type.sgml b/doc/src/sgml/ref/drop_type.sgml
index afaa2387fe..393be721e3 100644
--- a/doc/src/sgml/ref/drop_type.sgml
+++ b/doc/src/sgml/ref/drop_type.sgml
@@ -29,10 +29,11 @@ DROP TYPE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> [, ...
   <title>Description</title>
 
   <para>
-   <command>DROP TYPE</command> removes a user-defined data type.
-   Only the owner of a type can remove it.  This includes domains,
-   though they can be targeted specifically by using the
-   <xref linkend="sql-dropdomain"/> command.
+   <command>DROP TYPE</command> removes a user-defined data
+   <glossterm linkend="glossary-type">type</glossterm>.
+   Only the owner of a type can remove it.
+   This includes domains, though they can be targeted
+   specifically by using the <xref linkend="sql-dropdomain"/> command.
   </para>
  </refsect1>
 
@@ -45,7 +46,9 @@ DROP TYPE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> [, ...
     <listitem>
      <para>
       This parameter instructs <productname>PostgreSQL</productname> to search 
-      for the first instance of any type definition with the provided name.
+      for the first instance of any 
+      <glossterm linkend="glossary-type-definition">type definition</glossterm>
+      with the provided name.
       If no type definition is found a notice is issued and the command ends.
       If a type definition is found then it will be dropped. 
      </para>
