aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2024-04-07 15:36:08 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2024-04-07 15:36:11 -0400
commit1973d9fb318316df16b0da89e6fe5f2c53473b38 (patch)
tree68f067aa218861c06b3657ddfa278192bb6440e5 /doc/src
parenta0e0fb1ba56ff4323542c75ce997a41d31ad28a0 (diff)
downloadpostgresql-1973d9fb318316df16b0da89e6fe5f2c53473b38.tar.gz
postgresql-1973d9fb318316df16b0da89e6fe5f2c53473b38.zip
Doc: update documentation about EXCLUDE constraint elements.
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
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ref/alter_table.sgml2
-rw-r--r--doc/src/sgml/ref/create_table.sgml10
2 files changed, 6 insertions, 6 deletions
diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml
index a1703155854..8f5bf185dd3 100644
--- a/doc/src/sgml/ref/alter_table.sgml
+++ b/doc/src/sgml/ref/alter_table.sgml
@@ -143,7 +143,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
<phrase><replaceable class="parameter">exclude_element</replaceable> in an <literal>EXCLUDE</literal> constraint is:</phrase>
-{ <replaceable class="parameter">column_name</replaceable> | ( <replaceable class="parameter">expression</replaceable> ) } [ <replaceable class="parameter">opclass</replaceable> ] [ ASC | DESC ] [ NULLS { FIRST | LAST } ]
+{ <replaceable class="parameter">column_name</replaceable> | ( <replaceable class="parameter">expression</replaceable> ) } [ COLLATE <replaceable class="parameter">collation</replaceable> ] [ <replaceable class="parameter">opclass</replaceable> [ ( <replaceable class="parameter">opclass_parameter</replaceable> = <replaceable class="parameter">value</replaceable> [, ... ] ) ] ] [ ASC | DESC ] [ NULLS { FIRST | LAST } ]
<phrase><replaceable class="parameter">referential_action</replaceable> in a <literal>FOREIGN KEY</literal>/<literal>REFERENCES</literal> constraint is:</phrase>
diff --git a/doc/src/sgml/ref/create_table.sgml b/doc/src/sgml/ref/create_table.sgml
index dfb7822985e..02f31d2d6fd 100644
--- a/doc/src/sgml/ref/create_table.sgml
+++ b/doc/src/sgml/ref/create_table.sgml
@@ -105,7 +105,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
<phrase><replaceable class="parameter">exclude_element</replaceable> in an <literal>EXCLUDE</literal> constraint is:</phrase>
-{ <replaceable class="parameter">column_name</replaceable> | ( <replaceable class="parameter">expression</replaceable> ) } [ <replaceable class="parameter">opclass</replaceable> ] [ ASC | DESC ] [ NULLS { FIRST | LAST } ]
+{ <replaceable class="parameter">column_name</replaceable> | ( <replaceable class="parameter">expression</replaceable> ) } [ COLLATE <replaceable class="parameter">collation</replaceable> ] [ <replaceable class="parameter">opclass</replaceable> [ ( <replaceable class="parameter">opclass_parameter</replaceable> = <replaceable class="parameter">value</replaceable> [, ... ] ) ] ] [ ASC | DESC ] [ NULLS { FIRST | LAST } ]
<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
(see <xref linkend="datatype-geometric"/>) by using the
<literal>&amp;&amp;</literal> operator.
+ The operator(s) are required to be commutative.
</para>
<para>
@@ -1124,11 +1125,10 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
operator must be associated with an appropriate operator class
(see <xref linkend="indexes-opclass"/>) for the index access
method <replaceable>index_method</replaceable>.
- The operators are required to be commutative.
Each <replaceable class="parameter">exclude_element</replaceable>
- can optionally specify an operator class and/or ordering options;
- these are described fully under
- <xref linkend="sql-createindex"/>.
+ defines a column of the index, so it can optionally specify a collation,
+ an operator class, operator class parameters, and/or ordering options;
+ these are described fully under <xref linkend="sql-createindex"/>.
</para>
<para>