Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit02c4ad3

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 makeclear that it's a design limitation and not just an oversight ordocumentation omission.Discussion:https://postgr.es/m/152089733343.1222.6927268289645380498@wrigleys.postgresql.org
1 parenteb1c481 commit02c4ad3

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
@@ -3077,19 +3077,27 @@ SELECT person.name, holidays.num_weeks FROM person, holidays
30773077
<sect2>
30783078
<title>Implementation Details</title>
30793079

3080+
<para>
3081+
Enum labels are case sensitive, so
3082+
<type>'happy'</type> is not the same as <type>'HAPPY'</type>.
3083+
White space in the labels is significant too.
3084+
</para>
3085+
3086+
<para>
3087+
Although enum types are primarily intended for static sets of values,
3088+
there is support for adding new values to an existing enum type, and for
3089+
renaming values (see <xref linkend="sql-altertype">). Existing values
3090+
cannot be removed from an enum type, nor can the sort ordering of such
3091+
values be changed, short of dropping and re-creating the enum type.
3092+
</para>
3093+
30803094
<para>
30813095
An enum value occupies four bytes on disk. The length of an enum
30823096
value's textual label is limited by the <symbol>NAMEDATALEN</symbol>
30833097
setting compiled into <productname>PostgreSQL</productname>; in standard
30843098
builds this means at most 63 bytes.
30853099
</para>
30863100

3087-
<para>
3088-
Enum labels are case sensitive, so
3089-
<type>'happy'</type> is not the same as <type>'HAPPY'</type>.
3090-
White space in the labels is significant too.
3091-
</para>
3092-
30933101
<para>
30943102
The translations from internal enum values to textual labels are
30953103
kept in the system catalog

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp