|
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 $ --> |
2 | 2 |
|
3 | 3 | <chapter id="ddl">
|
4 | 4 | <title>Data Definition</title>
|
@@ -845,6 +845,36 @@ CREATE TABLE order_items (
|
845 | 845 | <xref linkend="sql-createtable" endterm="sql-createtable-title">.
|
846 | 846 | </para>
|
847 | 847 | </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 &&) |
| 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> |
848 | 878 | </sect1>
|
849 | 879 |
|
850 | 880 | <sect1 id="ddl-system-columns">
|
|