8000 Doc: explicitly point out that enum values can't be dropped. · Strider-Alex/postgres@013c0ba · GitHub
[go: up one dir, main page]

Skip to content

Commit 013c0ba

Browse files
committed
Doc: explicitly point out that enum values can't be dropped.
This was not stated in so many words anywhere. Document it to make clear that it's a design limitation and not just an oversight or documentation omission. Discussion: https://postgr.es/m/152089733343.1222.6927268289645380498@wrigleys.postgresql.org
1 parent 4120864 commit 013c0ba

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

doc/src/sgml/datatype.sgml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3059,19 +3059,27 @@ SELECT person.name, holidays.num_weeks FROM person, holidays
30593059
<sect2>
30603060
<title>Implementation Details</title>
30613061

3062+
<para>
3063+
Enum labels are case sensitive, so
3064+
<type>'happy'</type> is not the same as <type>'HAPPY'</type>.
3065+
White space in the labels is significant too.
3066+
</para>
3067+
3068+
<para>
3069+
Although enum types are primarily intended for static sets of values,
3070+
there is support for adding new values to an existing enum type, and for
3071+
renaming values (see <xref linkend="sql-altertype"/>). Existing values
3072+
cannot be removed from an enum type, nor can the sort ordering of such
3073+
values be changed, short of dropping and re-creating the enum type.
3074+
</para>
3075+
30623076
<para>
30633077
An enum value occupies four bytes on disk. The length of an enum
30643078
value's textual label is limited by the <symbol>NAMEDATALEN</symbol>
30653079
setting compiled into <productname>PostgreSQL</productname>; in standard
30663080
builds this means at most 63 bytes.
30673081
</para>
30683082

3069-
<para>
3070-
Enum labels are case sensitive, so
3071-
<type>'happy'</type> is not the same as <type>'HAPPY'</type>.
3072-
White space in the labels is significant too.
3073-
</para>
3074-
30753083
<para>
30763084
The translations from internal enum values to textual labels are
30773085
kept in the system catalog

0 commit comments

Comments
 (0)
0