File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,17 @@ SELECT reloptions FROM pg_class WHERE oid = 'reloptions_test'::regclass AND
87
87
-- RESET fails if a value is specified
88
88
ALTER TABLE reloptions_test RESET (fillfactor=12);
89
89
ERROR: RESET must not include values for parameters
90
+ -- We can RESET an invalid option which for some reason is already set
91
+ UPDATE pg_class
92
+ SET reloptions = '{fillfactor=13,autovacuum_enabled=false,illegal_option=4}'
93
+ WHERE oid = 'reloptions_test'::regclass;
94
+ ALTER TABLE reloptions_test RESET (illegal_option);
95
+ SELECT reloptions FROM pg_class WHERE oid = 'reloptions_test'::regclass;
96
+ reloptions
97
+ ------------------------------------------
98
+ {fillfactor=13,autovacuum_enabled=false}
99
+ (1 row)
100
+
90
101
-- Test vacuum_truncate option
91
102
DROP TABLE reloptions_test;
92
103
CREATE TEMP TABLE reloptions_test(i INT NOT NULL, j text)
Original file line number Diff line number Diff line change @@ -52,6 +52,13 @@ SELECT reloptions FROM pg_class WHERE oid = 'reloptions_test'::regclass AND
52
52
-- RESET fails if a value is specified
53
53
ALTER TABLE reloptions_test RESET (fillfactor= 12 );
54
54
55
+ -- We can RESET an invalid option which for some reason is already set
56
+ UPDATE pg_class
57
+ SET reloptions = ' {fillfactor=13,autovacuum_enabled=false,illegal_option=4}'
58
+ WHERE oid = ' reloptions_test' ::regclass;
59
+ ALTER TABLE reloptions_test RESET (illegal_option);
60
+ SELECT reloptions FROM pg_class WHERE oid = ' reloptions_test' ::regclass;
61
+
55
62
-- Test vacuum_truncate option
56
63
DROP TABLE reloptions_test;
57
64
You can’t perform that action at this time.
0 commit comments