Skip to content

Commit 69bae23

Browse files
committed
doc: Clarify CREATE TYPE ENUM documentation
The documentation claimed that an enum type requires "one or more" labels, but since 1fd9883, zero labels are also allowed. Reported-by: Lukas Eder <lukas.eder@gmail.com> Bug: #15356
1 parent a568cad commit 69bae23

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

doc/src/sgml/ref/create_type.sgml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,12 @@ CREATE TYPE <replaceable class="parameter">name</replaceable>
117117
<para>
118118
The second form of <command>CREATE TYPE</command> creates an enumerated
119119
(enum) type, as described in <xref linkend="datatype-enum"/>.
120-
Enum types take a list of one or more quoted labels, each of which
120+
Enum types take a list of quoted labels, each of which
121121
must be less than <symbol>NAMEDATALEN</symbol> bytes long (64 bytes in a
122-
standard <productname>PostgreSQL</productname> build).
122+
standard <productname>PostgreSQL</productname> build). (It is possible to
123+
create an enumerated type with zero labels, but such a type cannot be used
124+
to hold values before at least one label is added using <xref
125+
linkend="sql-altertype"/>.)
123126
</para>
124127
</refsect2>
125128

0 commit comments

Comments
 (0)