diff options
Diffstat (limited to 'src/test/regress/sql/alter_table.sql')
-rw-r--r-- | src/test/regress/sql/alter_table.sql | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/test/regress/sql/alter_table.sql b/src/test/regress/sql/alter_table.sql index 6ef9dd437bc..4e3849da005 100644 --- a/src/test/regress/sql/alter_table.sql +++ b/src/test/regress/sql/alter_table.sql @@ -1532,13 +1532,16 @@ alter table recur1 alter column f2 type recur2; -- fails -- SET STORAGE may need to add a TOAST table create table test_storage (a text); +select reltoastrelid <> 0 as has_toast_table + from pg_class where oid = 'test_storage'::regclass; alter table test_storage alter a set storage plain; -alter table test_storage add b int default 0; -- rewrite table to remove its TOAST table +-- rewrite table to remove its TOAST table; need a non-constant column default +alter table test_storage add b int default random()::int; +select reltoastrelid <> 0 as has_toast_table + from pg_class where oid = 'test_storage'::regclass; alter table test_storage alter a set storage extended; -- re-add TOAST table - select reltoastrelid <> 0 as has_toast_table -from pg_class -where oid = 'test_storage'::regclass; + from pg_class where oid = 'test_storage'::regclass; -- test that SET STORAGE propagates to index correctly create index test_storage_idx on test_storage (b, a); |