agora inbox for [email protected]
help / color / mirror / Atom feedFrom: Dagfinn Ilmari Mannsåker <[email protected]>
Subject: [PATCH] Add section headers to index types doc
Date: Fri, 31 Jul 2020 10:20:48 +0100
This makes it easier to compare the properties of different index
types at a glance.
In passing, make the index operator lists a single line each.
---
doc/src/sgml/indices.sgml | 81 +++++++++++++++++++--------------------
1 file changed, 39 insertions(+), 42 deletions(-)
diff --git a/doc/src/sgml/indices.sgml b/doc/src/sgml/indices.sgml
index 671299ff05..f22253f4c3 100644
--- a/doc/src/sgml/indices.sgml
+++ b/doc/src/sgml/indices.sgml
@@ -122,6 +122,9 @@
B-tree indexes, which fit the most common situations.
</para>
+ <sect2 id="indexes-types-btree">
+ <title>B-tree</title>
+
<para>
<indexterm>
<primary>index</primary>
@@ -137,13 +140,9 @@
will consider using a B-tree index whenever an indexed column is
involved in a comparison using one of these operators:
- <simplelist>
- <member><literal><</literal></member>
- <member><literal><=</literal></member>
- <member><literal>=</literal></member>
- <member><literal>>=</literal></member>
- <member><literal>></literal></member>
- </simplelist>
+<synopsis>
+< <= = >= >
+</synopsis>
Constructs equivalent to combinations of these operators, such as
<literal>BETWEEN</literal> and <literal>IN</literal>, can also be implemented with
@@ -172,6 +171,10 @@
This is not always faster than a simple scan and sort, but it is
often helpful.
</para>
+ </sect2>
+
+ <sect2 id="indexes-types-hash">
+ <title>Hash</title>
<para>
<indexterm>
@@ -191,6 +194,10 @@
CREATE INDEX <replaceable>name</replaceable> ON <replaceable>table</replaceable> USING HASH (<replaceable>column</replaceable>);
</synopsis>
</para>
+ </sect2>
+
+ <sect2 id="indexes-type-gist">
+ <title>GiST</title>
<para>
<indexterm>
@@ -210,20 +217,9 @@
for several two-dimensional geometric data types, which support indexed
queries using these operators:
- <simplelist>
- <member><literal><<</literal></member>
- <member><literal>&<</literal></member>
- <member><literal>&></literal></member>
- <member><literal>>></literal></member>
- <member><literal><<|</literal></member>
- <member><literal>&<|</literal></member>
- <member><literal>|&></literal></member>
- <member><literal>|>></literal></member>
- <member><literal>@></literal></member>
- <member><literal><@</literal></member>
- <member><literal>~=</literal></member>
- <member><literal>&&</literal></member>
- </simplelist>
+<synopsis>
+<< &< &> >> <<| &<| |&> |>> @> <@ ~= &&
+</synopsis>
(See <xref linkend="functions-geometry"/> for the meaning of
these operators.)
@@ -246,6 +242,10 @@
In <xref linkend="gist-builtin-opclasses-table"/>, operators that can be
used in this way are listed in the column <quote>Ordering Operators</quote>.
</para>
+ </sect2>
+
+ <sect2 id="indexes-type-spgist">
+ <title>SP-GiST</title>
<para>
<indexterm>
@@ -264,14 +264,9 @@
for two-dimensional points, which support indexed
queries using these operators:
- <simplelist>
- <member><literal><<</literal></member>
- <member><literal>>></literal></member>
- <member><literal>~=</literal></member>
- <member><literal><@</literal></member>
- <member><literal><^</literal></member>
- <member><literal>>^</literal></member>
- </simplelist>
+<synopsis>
+<< >> ~= <@ <^ >^
+</synopsis>
(See <xref linkend="functions-geometry"/> for the meaning of
these operators.)
@@ -286,6 +281,10 @@
corresponding operator is specified in the <quote>Ordering Operators</quote>
column in <xref linkend="spgist-builtin-opclasses-table"/>.
</para>
+ </sect2>
+
+ <sect2 id="indexes-types-gin">
+ <title>GIN</title>
<para>
<indexterm>
@@ -312,12 +311,9 @@
<productname>PostgreSQL</productname> includes a GIN operator class
for arrays, which supports indexed queries using these operators:
- <simplelist>
- <member><literal><@</literal></member>
- <member><literal>@></literal></member>
- <member><literal>=</literal></member>
- <member><literal>&&</literal></member>
- </simplelist>
+<synopsis>
+<@ @> = &&
+</synopsis>
(See <xref linkend="functions-array"/> for the meaning of
these operators.)
@@ -327,6 +323,10 @@
classes are available in the <literal>contrib</literal> collection or as separate
projects. For more information see <xref linkend="gin"/>.
</para>
+ </sect2>
+
+ <sect2 id="indexes-types-brin">
+ <title>BRIN</title>
<para>
<indexterm>
@@ -348,18 +348,15 @@
values in the column for each block range. This supports indexed queries
using these operators:
- <simplelist>
- <member><literal><</literal></member>
- <member><literal><=</literal></member>
- <member><literal>=</literal></member>
- <member><literal>>=</literal></member>
- <member><literal>></literal></member>
- </simplelist>
+<synopsis>
+< <= = >= >
+</synopsis>
The BRIN operator classes included in the standard distribution are
documented in <xref linkend="brin-builtin-opclasses-table"/>.
For more information see <xref linkend="brin"/>.
</para>
+ </sect2>
</sect1>
--
2.27.0
--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline;
filename=0002-Reindent-index-types-docs-after-previous-commit.patch
view thread (3+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: [PATCH] Add section headers to index types doc
In-Reply-To: <no-message-id-178626@localhost>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox