Skip to content

Commit 0189c42

Browse files
committed
Add contraint exclusion section to contraint docs.
Takahiro Itagaki
1 parent 5494373 commit 0189c42

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

doc/src/sgml/ddl.sgml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/ddl.sgml,v 1.90 2010/02/24 15:54:31 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/ddl.sgml,v 1.91 2010/04/01 01:18:17 momjian Exp $ -->
22

33
<chapter id="ddl">
44
<title>Data Definition</title>
@@ -845,6 +845,36 @@ CREATE TABLE order_items (
845845
<xref linkend="sql-createtable" endterm="sql-createtable-title">.
846846
</para>
847847
</sect2>
848+
849+
<sect2>
850+
<title>Exclusion constraints</title>
851+
852+
<indexterm>
853+
<primary>exclusion constraint</primary>
854+
</indexterm>
855+
856+
<indexterm>
857+
<primary>constraint</primary>
858+
<secondary>exclusion</secondary>
859+
</indexterm>
860+
861+
<para>
862+
Exclusion constraints ensure that if any two rows are compared on
863+
the specified columns or expressions using the specified operators,
864+
at least one of these operator comparisons will be false. The syntax is:
865+
<programlisting>
866+
CREATE TABLE circles (
867+
c circle,
868+
EXCLUDE USING gist (c WITH &amp;&amp;)
869+
);
870+
</programlisting>
871+
</para>
872+
873+
<para>
874+
See also <link linkend="SQL-CREATETABLE-EXCLUDE"><command>CREATE
875+
TABLE ... CONSTRAINT ... EXCLUDE</></link> for details.
876+
</para>
877+
</sect2>
848878
</sect1>
849879

850880
<sect1 id="ddl-system-columns">

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy