1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-03 09:13:20 +03:00

Support writing "CREATE/ALTER TABLE ... SET STORAGE DEFAULT".

We already allow explicitly writing DEFAULT for SET COMPRESSION,
so it seems a bit inflexible and non-orthogonal to not have it
for STORAGE.

Aleksander Alekseev

Discussion: https://postgr.es/m/CAJ7c6TMX9ui+6y3TQFaXJYVpZyBukvqhQbVDJ8OUokeLRhtnpA@mail.gmail.com
This commit is contained in:
Tom Lane
2022-11-10 18:20:49 -05:00
parent b158e0b1b1
commit b9424d014e
9 changed files with 31 additions and 22 deletions

View File

@@ -1535,7 +1535,7 @@ alter table test_storage alter a set storage plain;
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
alter table test_storage alter a set storage default; -- re-add TOAST table
select reltoastrelid <> 0 as has_toast_table
from pg_class where oid = 'test_storage'::regclass;