Doc: explicitly point out that enum values can't be dropped.
authorTom Lane
Fri, 16 Mar 2018 17:44:34 +0000 (13:44 -0400)
committerTom Lane
Fri, 16 Mar 2018 17:44:43 +0000 (13:44 -0400)
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

doc/src/sgml/datatype.sgml

index 9aa9b28f3e2a5068e16c639733f52e81124bfa68..1736478a42b60ae4ac08aec8dd4f00943a20f9cd 100644 (file)
@@ -3059,6 +3059,20 @@ SELECT person.name, holidays.num_weeks FROM person, holidays
    
     Implementation Details
 
+    
+     Enum labels are case sensitive, so
+     'happy' is not the same as 'HAPPY'.
+     White space in the labels is significant too.
+    
+
+    
+     Although enum types are primarily intended for static sets of values,
+     there is support for adding new values to an existing enum type, and for
+     renaming values (see ).  Existing values
+     cannot be removed from an enum type, nor can the sort ordering of such
+     values be changed, short of dropping and re-creating the enum type.
+    
+
     
      An enum value occupies four bytes on disk.  The length of an enum
      value's textual label is limited by the NAMEDATALEN
@@ -3066,12 +3080,6 @@ SELECT person.name, holidays.num_weeks FROM person, holidays
      builds this means at most 63 bytes.
     
 
-    
-     Enum labels are case sensitive, so
-     'happy' is not the same as 'HAPPY'.
-     White space in the labels is significant too.
-    
-
     
      The translations from internal enum values to textual labels are
      kept in the system catalog