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

Appearance settings

Commit 013c0ba

Browse filesBrowse 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
Copy full SHA for 013c0ba

File tree

Expand file treeCollapse file tree

1 file changed

+14
-6
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+14
-6
lines changed

‎doc/src/sgml/datatype.sgml

Copy file name to clipboardExpand all lines: doc/src/sgml/datatype.sgml
+14-6Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.