0001-doc-Clarify-CREATE-TYPE-ENUM-documentation.patch
text/plain
Filename: 0001-doc-Clarify-CREATE-TYPE-ENUM-documentation.patch
Type: text/plain
Part: 0
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: format-patch
Series: patch 0001
Subject: doc: Clarify CREATE TYPE ENUM documentation
| File | + | − |
|---|---|---|
| doc/src/sgml/ref/create_type.sgml | 5 | 2 |
From fdfb4f23ead10a25e3f6acdda2eb46fb24a122df Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter_e@gmx.net>
Date: Tue, 13 Nov 2018 10:42:43 +0100
Subject: [PATCH] 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
---
doc/src/sgml/ref/create_type.sgml | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/doc/src/sgml/ref/create_type.sgml b/doc/src/sgml/ref/create_type.sgml
index fa9b520b24..175315f3d7 100644
--- a/doc/src/sgml/ref/create_type.sgml
+++ b/doc/src/sgml/ref/create_type.sgml
@@ -117,9 +117,12 @@ <title>Enumerated Types</title>
<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>
--
2.19.1