]> granicus.if.org Git - postgresql/commitdiff
doc: Clarify CREATE TYPE ENUM documentation
authorPeter Eisentraut <peter_e@gmx.net>
Tue, 13 Nov 2018 09:42:43 +0000 (10:42 +0100)
committerPeter Eisentraut <peter_e@gmx.net>
Tue, 20 Nov 2018 08:37:02 +0000 (09:37 +0100)
The documentation claimed that an enum type requires "one or more"
labels, but since 1fd9883ff49, zero labels are also allowed.

Reported-by: Lukas Eder <lukas.eder@gmail.com>
Bug: #15356

doc/src/sgml/ref/create_type.sgml

index fa9b520b241953ddd6c91de6b011547f26383aca..175315f3d7e456332a2b9c667773727e2d3e5f46 100644 (file)
@@ -117,9 +117,12 @@ CREATE TYPE <replaceable class="parameter">name</replaceable>
    <para>
     The second form of <command>CREATE TYPE</command> creates an enumerated
     (enum) type, as described in <xref linkend="datatype-enum"/>.
-    Enum types take a list of one or more quoted labels, each of which
+    Enum types take a list of quoted labels, each of which
     must be less than <symbol>NAMEDATALEN</symbol> bytes long (64 bytes in a
-    standard <productname>PostgreSQL</productname> build).
+    standard <productname>PostgreSQL</productname> build).  (It is possible to
+    create an enumerated type with zero labels, but such a type cannot be used
+    to hold values before at least one label is added using <xref
+    linkend="sql-altertype"/>.)
    </para>
   </refsect2>