mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
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
This commit is contained in:
@ -76,7 +76,7 @@ ALTER TABLE [ IF EXISTS ] <replaceable class="parameter">name</replaceable>
|
||||
CLUSTER ON <replaceable class="parameter">index_name</replaceable>
|
||||
SET WITHOUT CLUSTER
|
||||
SET WITHOUT OIDS
|
||||
SET ACCESS METHOD <replaceable class="parameter">new_access_method</replaceable>
|
||||
SET ACCESS METHOD { <replaceable class="parameter">new_access_method</replaceable> | DEFAULT }
|
||||
SET TABLESPACE <replaceable class="parameter">new_tablespace</replaceable>
|
||||
SET { LOGGED | UNLOGGED }
|
||||
SET ( <replaceable class="parameter">storage_parameter</replaceable> [= <replaceable class="parameter">value</replaceable>] [, ... ] )
|
||||
@ -733,7 +733,9 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
|
||||
<listitem>
|
||||
<para>
|
||||
This form changes the access method of the table by rewriting it. See
|
||||
<xref linkend="tableam"/> for more information.
|
||||
<xref linkend="tableam"/> for more information. Writing
|
||||
<literal>DEFAULT</literal> changes the access method of the table
|
||||
to <xref linkend="guc-default-table-access-method"/>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
Reference in New Issue
Block a user