summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2018-11-13 10:42:43 +0100
committerPeter Eisentraut <peter_e@gmx.net>2018-11-20 09:51:01 +0100
commit3954554464a5cc62651f6f15fa1a053251060ebb (patch)
tree0f16f847fe5a4e25781d79245ec9c2465c7bf2d5
parente1d8f18b8700aee13d4b0927898ba4ad6fa15852 (diff)
doc: Clarify CREATE TYPE ENUM documentation
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
-rw-r--r--doc/src/sgml/ref/create_type.sgml7
1 files changed, 5 insertions, 2 deletions
diff --git a/doc/src/sgml/ref/create_type.sgml b/doc/src/sgml/ref/create_type.sgml
index e5d7992bbf5..a0042f07209 100644
--- a/doc/src/sgml/ref/create_type.sgml
+++ b/doc/src/sgml/ref/create_type.sgml
@@ -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>