aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2024-03-08 09:31:52 +0900
committerMichael Paquier <michael@paquier.xyz>2024-03-08 09:31:52 +0900
commitd61a6cad6418f643a5773352038d0dfe5d3535b8 (patch)
tree10791cac8cc32610b5784768d966b2eaa0109f67 /doc/src
parent4f8c1e7aaf11c42fa658eeab9baef0a035e76fe2 (diff)
downloadpostgresql-d61a6cad6418f643a5773352038d0dfe5d3535b8.tar.gz
postgresql-d61a6cad6418f643a5773352038d0dfe5d3535b8.zip
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
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ref/alter_table.sgml6
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml
index 9670671107e..96e3d776051 100644
--- a/doc/src/sgml/ref/alter_table.sgml
+++ b/doc/src/sgml/ref/alter_table.sgml
@@ -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>