summaryrefslogtreecommitdiff
path: root/doc/src/sgml/ref/create_table.sgml
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2022-11-10 18:20:49 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2022-11-10 18:20:49 -0500
commitb9424d014e195386a83b0f1fe9f5a8e5727e46ea (patch)
treefbc7de3418735abffebfea6c67f5f4a8f1c9d170 /doc/src/sgml/ref/create_table.sgml
parentb158e0b1b1bfd2dfce6d66d67dba3c94449f9cac (diff)
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
Diffstat (limited to 'doc/src/sgml/ref/create_table.sgml')
-rw-r--r--doc/src/sgml/ref/create_table.sgml18
1 files changed, 10 insertions, 8 deletions
diff --git a/doc/src/sgml/ref/create_table.sgml b/doc/src/sgml/ref/create_table.sgml
index c14b2010d81..c98223b2a51 100644
--- a/doc/src/sgml/ref/create_table.sgml
+++ b/doc/src/sgml/ref/create_table.sgml
@@ -22,7 +22,7 @@ PostgreSQL documentation
<refsynopsisdiv>
<synopsis>
CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE [ IF NOT EXISTS ] <replaceable class="parameter">table_name</replaceable> ( [
- { <replaceable class="parameter">column_name</replaceable> <replaceable class="parameter">data_type</replaceable> [ STORAGE { PLAIN | EXTERNAL | EXTENDED | MAIN } ] [ COMPRESSION <replaceable>compression_method</replaceable> ] [ COLLATE <replaceable>collation</replaceable> ] [ <replaceable class="parameter">column_constraint</replaceable> [ ... ] ]
+ { <replaceable class="parameter">column_name</replaceable> <replaceable class="parameter">data_type</replaceable> [ STORAGE { PLAIN | EXTERNAL | EXTENDED | MAIN | DEFAULT } ] [ COMPRESSION <replaceable>compression_method</replaceable> ] [ COLLATE <replaceable>collation</replaceable> ] [ <replaceable class="parameter">column_constraint</replaceable> [ ... ] ]
| <replaceable>table_constraint</replaceable>
| LIKE <replaceable>source_table</replaceable> [ <replaceable>like_option</replaceable> ... ] }
[, ... ]
@@ -299,7 +299,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
<varlistentry>
<term>
- <literal>STORAGE { PLAIN | EXTERNAL | EXTENDED | MAIN }</literal>
+ <literal>STORAGE { PLAIN | EXTERNAL | EXTENDED | MAIN | DEFAULT }</literal>
<indexterm>
<primary>TOAST</primary>
<secondary>per-column storage settings</secondary>
@@ -314,12 +314,14 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
inline, uncompressed. <literal>MAIN</literal> is for inline, compressible
data. <literal>EXTERNAL</literal> is for external, uncompressed data, and
<literal>EXTENDED</literal> is for external, compressed data.
- <literal>EXTENDED</literal> is the default for most data types that
- support non-<literal>PLAIN</literal> storage. Use of
- <literal>EXTERNAL</literal> will make substring operations on very large
- <type>text</type> and <type>bytea</type> values run faster, at the penalty
- of increased storage space. See <xref linkend="storage-toast"/> for more
- information.
+ Writing <literal>DEFAULT</literal> sets the storage mode to the default
+ mode for the column's data type. <literal>EXTENDED</literal> is the
+ default for most data types that support non-<literal>PLAIN</literal>
+ storage.
+ Use of <literal>EXTERNAL</literal> will make substring operations on
+ very large <type>text</type> and <type>bytea</type> values run faster,
+ at the penalty of increased storage space.
+ See <xref linkend="storage-toast"/> for more information.
</para>
</listitem>
</varlistentry>