@@ -42,6 +42,10 @@ ALTER INDEX dummy_test_idx SET (option_bool = true);
4242ALTER INDEX dummy_test_idx SET (option_real = 3.2);
4343ALTER INDEX dummy_test_idx SET (option_string_val = 'val2');
4444ALTER INDEX dummy_test_idx SET (option_string_null = NULL);
45+ ALTER INDEX dummy_test_idx SET (option_enum = 'one');
46+ ALTER INDEX dummy_test_idx SET (option_enum = 'three');
47+ ERROR: invalid value for enum option "option_enum": three
48+ DETAIL: Valid values are "one" and "two".
4549SELECT unnest(reloptions) FROM pg_class WHERE relname = 'dummy_test_idx';
4650 unnest
4751-------------------------
@@ -50,12 +54,14 @@ SELECT unnest(reloptions) FROM pg_class WHERE relname = 'dummy_test_idx';
5054 option_real=3.2
5155 option_string_val=val2
5256 option_string_null=null
53- (5 rows)
57+ option_enum=one
58+ (6 rows)
5459
5560-- ALTER INDEX .. RESET
5661ALTER INDEX dummy_test_idx RESET (option_int);
5762ALTER INDEX dummy_test_idx RESET (option_bool);
5863ALTER INDEX dummy_test_idx RESET (option_real);
64+ ALTER INDEX dummy_test_idx RESET (option_enum);
5965ALTER INDEX dummy_test_idx RESET (option_string_val);
6066ALTER INDEX dummy_test_idx RESET (option_string_null);
6167SELECT unnest(reloptions) FROM pg_class WHERE relname = 'dummy_test_idx';
@@ -105,6 +111,24 @@ SELECT unnest(reloptions) FROM pg_class WHERE relname = 'dummy_test_idx';
105111(1 row)
106112
107113ALTER INDEX dummy_test_idx RESET (option_real);
114+ -- Enum
115+ ALTER INDEX dummy_test_idx SET (option_enum = 'one'); -- ok
116+ ALTER INDEX dummy_test_idx SET (option_enum = 0); -- error
117+ ERROR: invalid value for enum option "option_enum": 0
118+ DETAIL: Valid values are "one" and "two".
119+ ALTER INDEX dummy_test_idx SET (option_enum = true); -- error
120+ ERROR: invalid value for enum option "option_enum": true
121+ DETAIL: Valid values are "one" and "two".
122+ ALTER INDEX dummy_test_idx SET (option_enum = 'three'); -- error
123+ ERROR: invalid value for enum option "option_enum": three
124+ DETAIL: Valid values are "one" and "two".
125+ SELECT unnest(reloptions) FROM pg_class WHERE relname = 'dummy_test_idx';
126+ unnest
127+ -----------------
128+ option_enum=one
129+ (1 row)
130+
131+ ALTER INDEX dummy_test_idx RESET (option_enum);
108132-- String
109133ALTER INDEX dummy_test_idx SET (option_string_val = 4); -- ok
110134ALTER INDEX dummy_test_idx SET (option_string_val = 3.5); -- ok
0 commit comments