mirror of
https://github.com/postgres/postgres.git
synced 2025-11-04 20:11:56 +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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user