diff options
Diffstat (limited to 'doc/src/sgml/cube.sgml')
-rw-r--r-- | doc/src/sgml/cube.sgml | 101 |
1 files changed, 59 insertions, 42 deletions
diff --git a/doc/src/sgml/cube.sgml b/doc/src/sgml/cube.sgml index 7c28a81f5c6..1fe8ae0e06a 100644 --- a/doc/src/sgml/cube.sgml +++ b/doc/src/sgml/cube.sgml @@ -1,4 +1,4 @@ -<!-- $PostgreSQL: pgsql/doc/src/sgml/cube.sgml,v 1.7 2009/12/08 20:08:30 mha Exp $ --> +<!-- $PostgreSQL: pgsql/doc/src/sgml/cube.sgml,v 1.8 2010/07/29 19:34:40 petere Exp $ --> <sect1 id="cube"> <title>cube</title> @@ -98,47 +98,46 @@ <para> The <filename>cube</> module includes a GiST index operator class for <type>cube</> values. - The operators supported by the GiST opclass include: + The operators supported by the GiST opclass are shown in <xref linkend="cube-gist-operators">. </para> - <itemizedlist> - <listitem> - <programlisting> -a = b Same as - </programlisting> - <para> - The cubes a and b are identical. - </para> - </listitem> - <listitem> - <programlisting> -a && b Overlaps - </programlisting> - <para> - The cubes a and b overlap. - </para> - </listitem> - <listitem> - <programlisting> -a @> b Contains - </programlisting> - <para> - The cube a contains the cube b. - </para> - </listitem> - <listitem> - <programlisting> -a <@ b Contained in - </programlisting> - <para> - The cube a is contained in the cube b. - </para> - </listitem> - </itemizedlist> + <table id="cube-gist-operators"> + <title>Cube GiST operators</title> + <tgroup cols="2"> + <thead> + <row> + <entry>Operator</entry> + <entry>Description</entry> + </row> + </thead> + + <tbody> + <row> + <entry><literal>a = b</></entry> + <entry>The cubes a and b are identical.</entry> + </row> + + <row> + <entry><literal>a && b</></entry> + <entry>The cubes a and b overlap.</entry> + </row> + + <row> + <entry><literal>a @> b</></entry> + <entry>The cube a contains the cube b.</entry> + </row> + + <row> + <entry><literal>a <@ b</></entry> + <entry>The cube a is contained in the cube b.</entry> + </row> + </tbody> + </tgroup> + </table> <para> - (Before PostgreSQL 8.2, the containment operators @> and <@ were - respectively called @ and ~. These names are still available, but are + (Before PostgreSQL 8.2, the containment operators <literal>@></> and <literal><@</> were + respectively called <literal>@</> and <literal>~</>. These names are still available, but are deprecated and will eventually be retired. Notice that the old names are reversed from the convention formerly followed by the core geometric datatypes!) @@ -147,10 +146,28 @@ a <@ b Contained in <para> The standard B-tree operators are also provided, for example - <programlisting> -[a, b] < [c, d] Less than -[a, b] > [c, d] Greater than - </programlisting> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>Operator</entry> + <entry>Description</entry> + </row> + </thead> + + <tbody> + <row> + <entry><literal>[a, b] < [c, d]</literal></entry> + <entry>Less than</entry> + </row> + + <row> + <entry><literal>[a, b] > [c, d]</literal></entry> + <entry>Greater than</entry> + </row> + </tbody> + </tgroup> + </informaltable> These operators do not make a lot of sense for any practical purpose but sorting. These operators first compare (a) to (c), |