Add support for DEFAULT in ALTER TABLE .. SET ACCESS METHOD
authorMichael Paquier
Fri, 8 Mar 2024 00:31:52 +0000 (09:31 +0900)
committerMichael Paquier
Fri, 8 Mar 2024 00:31:52 +0000 (09:31 +0900)
commitd61a6cad6418f643a5773352038d0dfe5d3535b8
tree10791cac8cc32610b5784768d966b2eaa0109f67
parent4f8c1e7aaf11c42fa658eeab9baef0a035e76fe2
Add support for DEFAULT in ALTER TABLE .. SET ACCESS METHOD

This option can be used to switch a relation to use the access method
set by default_table_access_method when running the command.

This has come up when discussing the possibility to support setting
pg_class.relam for partitioned tables (left out here as future work),
while being useful on its own for relations with physical storage as
these must have an access method set.

Per suggestion from Justin Pryzby.

Author: Michael Paquier
Reviewed-by: Justin Pryzby
Discussion: https://postgr.es/m/ZeCZ89xAVFeOmrQC@pryzbyj2023
doc/src/sgml/ref/alter_table.sgml
src/backend/commands/tablecmds.c
src/backend/parser/gram.y
src/bin/psql/tab-complete.c
src/test/regress/expected/create_am.out
src/test/regress/sql/create_am.sql