What the documentation calls an exclude_element is an index_elem
according to gram.y, and it allows all the same options that
a CREATE INDEX column specification does. The COLLATE patch
neglected to update the CREATE/ALTER TABLE docs about that,
and later the opclass-parameters patch made the same oversight.
Add those options to the syntax synopses, and polish the
associated text a bit.
Back-patch to v13 where opclass parameters came in. We could
update v12 with just the COLLATE omission, but it doesn't quite
seem worth the trouble at this point.
Shihao Zhong, reviewed by Daniel Vérité, Shubham Khanna and myself
Discussion: https://postgr.es/m/CAGRkXqShbVyB8E3gapfdtuwiWTiK=Q67Qb9qwxu=+-w0w46EBA@mail.gmail.com
<phrase><replaceable class="parameter">referential_action</replaceable> in a <literal>FOREIGN KEY</literal>/<literal>REFERENCES</literal> constraint is:</phrase>
<phrase><replaceable class="parameter">referential_action</replaceable> in a <literal>FOREIGN KEY</literal>/<literal>REFERENCES</literal> constraint is:</phrase>
<phrase><replaceable class="parameter">referential_action</replaceable> in a <literal>FOREIGN KEY</literal>/<literal>REFERENCES</literal> constraint is:</phrase>
<phrase><replaceable class="parameter">referential_action</replaceable> in a <literal>FOREIGN KEY</literal>/<literal>REFERENCES</literal> constraint is:</phrase>
@ -1116,6 +1116,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
no two rows in the table contain overlapping circles
no two rows in the table contain overlapping circles
(see <xref linkend="datatype-geometric"/>) by using the
(see <xref linkend="datatype-geometric"/>) by using the
<literal>&&</literal> operator.
<literal>&&</literal> operator.
The operator(s) are required to be commutative.
</para>
</para>
<para>
<para>
@ -1124,11 +1125,10 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
operator must be associated with an appropriate operator class
operator must be associated with an appropriate operator class
(see <xref linkend="indexes-opclass"/>) for the index access
(see <xref linkend="indexes-opclass"/>) for the index access
method <replaceable>index_method</replaceable>.
method <replaceable>index_method</replaceable>.
The operators are required to be commutative.
Each <replaceable class="parameter">exclude_element</replaceable>
Each <replaceable class="parameter">exclude_element</replaceable>
can optionally specify an operator class and/or ordering options;
defines a column of the index, so it can optionally specify a collation,
these are described fully under
an operator class, operator class parameters, and/or ordering options;
<xref linkend="sql-createindex"/>.
these are described fully under <xref linkend="sql-createindex"/>.