1
- <!-- $PostgreSQL: pgsql/doc/src/sgml/btree-gist.sgml,v 1.6 2010/08/02 16:26:48 rhaas Exp $ -->
1
+ <!-- $PostgreSQL: pgsql/doc/src/sgml/btree-gist.sgml,v 1.7 2010/08/03 15:15:31 tgl Exp $ -->
2
2
3
3
<sect1 id="btree-gist">
4
4
<title>btree_gist</title>
29
29
30
30
<para>
31
31
In addition to the typical btree search operators, btree_gist also
32
- provides search operators for <literal><></literal> (" not
33
- equals" ). This may be useful in combination with an
34
- <link linkend="SQL-CREATETABLE-EXCLUDE">Exclusion Constraint </link>,
35
- as descibed below.
32
+ provides search operators for <literal><></literal> (<quote> not
33
+ equals</quote> ). This may be useful in combination with an
34
+ <link linkend="SQL-CREATETABLE-EXCLUDE">exclusion constraint </link>,
35
+ as described below.
36
36
</para>
37
37
38
38
<sect2>
@@ -51,26 +51,26 @@ SELECT * FROM test WHERE a < 10;
51
51
</programlisting>
52
52
53
53
<para>
54
- Example using an <link linkend="SQL-CREATETABLE-EXCLUDE">Exclusion
55
- Constraint </link> to enforce the constraint that a cage at a zoo
54
+ Use an <link linkend="SQL-CREATETABLE-EXCLUDE">exclusion
55
+ constraint </link> to enforce the rule that a cage at a zoo
56
56
can contain only one kind of animal:
57
57
</para>
58
58
59
59
<programlisting>
60
- => CREATE TABLE zoo (
60
+ => CREATE TABLE zoo (
61
61
cage INTEGER,
62
62
animal TEXT,
63
- EXCLUDE USING gist (cage WITH =, animal WITH <> )
63
+ EXCLUDE USING gist (cage WITH =, animal WITH <> )
64
64
);
65
65
66
- => INSERT INTO zoo VALUES(123, 'zebra');
66
+ => INSERT INTO zoo VALUES(123, 'zebra');
67
67
INSERT 0 1
68
- => INSERT INTO zoo VALUES(123, 'zebra');
68
+ => INSERT INTO zoo VALUES(123, 'zebra');
69
69
INSERT 0 1
70
- => INSERT INTO zoo VALUES(123, 'lion');
70
+ => INSERT INTO zoo VALUES(123, 'lion');
71
71
ERROR: conflicting key value violates exclusion constraint "zoo_cage_animal_excl"
72
72
DETAIL: Key (cage, animal)=(123, lion) conflicts with existing key (cage, animal)=(123, zebra).
73
- => INSERT INTO zoo VALUES(124, 'lion');
73
+ => INSERT INTO zoo VALUES(124, 'lion');
74
74
INSERT 0 1
75
75
</programlisting>
76
76
0 commit comments