This section once started out small but has now grown quite a bit and
needs a bit of structure.
Rewrite as list, add documentation of EXCLUDING, and improve the
documentation of INCLUDING ALL instead of just listing all the options
again.
per report from Yugo Nagata that EXCLUDING was not documented, that part
reviewed by Daniel Gustafsson, most of the rewrite was by me
and <literal>EXCLUDE</literal> constraints on the original table will be
created on the new table only if <literal>INCLUDING INDEXES</literal>
is specified. Names for the new indexes and constraints are
chosen according to the default rules, regardless of how the originals
were named. (This behavior avoids possible duplicate-name failures for
the new indexes.)
</para>
<para>
<literal>STORAGE</literal> settings for the copied column definitions will be
copied only if <literal>INCLUDING STORAGE</literal> is specified. The
default behavior is to exclude <literal>STORAGE</literal> settings, resulting
in the copied columns in the new table having type-specific default
settings. For more on <literal>STORAGE</literal> settings, see
<xref linkend="storage-toast"/>.
</para>
<para>
Comments for the copied columns, constraints, and indexes
will be copied only if <literal>INCLUDING COMMENTS</literal>
is specified. The default behavior is to exclude comments, resulting in
the copied columns and constraints in the new table having no comments.
</para>
<para>
<literal>INCLUDING ALL</literal> is an abbreviated form of
<literal>INCLUDING COMMENTS INCLUDING CONSTRAINTS INCLUDING DEFAULTS INCLUDING IDENTITY INCLUDING INDEXES INCLUDING STATISTICS INCLUDING STORAGE</literal>.
</para>
<para>
Note that unlike <literal>INHERITS</literal>, columns and
constraints copied by <literal>LIKE</literal> are not merged with similarly
constraints copied by <literal>LIKE</literal> are not merged with similarly
named columns and constraints.
named columns and constraints.
If the same name is specified explicitly or in another
If the same name is specified explicitly or in another
<literal>LIKE</literal> clause, an error is signaled.
<literal>LIKE</literal> clause, an error is signaled.
</para>
</para>
<para>
The optional <replaceable>like_option</replaceable> clauses specify
which additional properties of the original table to copy. Specifying
<literal>INCLUDING</literal> copies the property, specifying
<literal>EXCLUDING</literal> omits the property.
<literal>EXCLUDING</literal> is the default. If multiple specifications
are made for the same kind of object, the last one is used. The