mirror of
https://github.com/postgres/postgres.git
synced 2025-10-25 13:17:41 +03:00
The original titles only had the module name, which is not very useful when scanning the list. By adding a very brief description to each title, the table of contents becomes friendlier. Also amend the introduction in the "additional modules" appendix, using the word "Extension" more extensively. Nowadays, almost all contrib modules are extensions, so this is also helpful. Author: Karl O. Pinc <kop@karlpinc.com> Reviewed-by: Brar Piening <brar@gmx.de> Discussion: https://postgr.es/m/20230102180015.372995a9@slate.karlpinc.com
67 lines
2.4 KiB
Plaintext
67 lines
2.4 KiB
Plaintext
<!-- doc/src/sgml/btree-gin.sgml -->
|
|
|
|
<sect1 id="btree-gin" xreflabel="btree_gin">
|
|
<title>btree_gin — GIN operator classes with B-tree behavior</title>
|
|
|
|
<indexterm zone="btree-gin">
|
|
<primary>btree_gin</primary>
|
|
</indexterm>
|
|
|
|
<para>
|
|
<filename>btree_gin</filename> provides GIN operator classes that
|
|
implement B-tree equivalent behavior for the data types
|
|
<type>int2</type>, <type>int4</type>, <type>int8</type>, <type>float4</type>,
|
|
<type>float8</type>, <type>timestamp with time zone</type>,
|
|
<type>timestamp without time zone</type>, <type>time with time zone</type>,
|
|
<type>time without time zone</type>, <type>date</type>, <type>interval</type>,
|
|
<type>oid</type>, <type>money</type>, <type>"char"</type>,
|
|
<type>varchar</type>, <type>text</type>, <type>bytea</type>, <type>bit</type>,
|
|
<type>varbit</type>, <type>macaddr</type>, <type>macaddr8</type>, <type>inet</type>,
|
|
<type>cidr</type>, <type>uuid</type>, <type>name</type>, <type>bool</type>,
|
|
<type>bpchar</type>, and all <type>enum</type> types.
|
|
</para>
|
|
|
|
<para>
|
|
In general, these operator classes will not outperform the equivalent
|
|
standard B-tree index methods, and they lack one major feature of the
|
|
standard B-tree code: the ability to enforce uniqueness. However,
|
|
they are useful for GIN testing and as a base for developing other
|
|
GIN operator classes. Also, for queries that test both a GIN-indexable
|
|
column and a B-tree-indexable column, it might be more efficient to create
|
|
a multicolumn GIN index that uses one of these operator classes than to create
|
|
two separate indexes that would have to be combined via bitmap ANDing.
|
|
</para>
|
|
|
|
<para>
|
|
This module is considered <quote>trusted</quote>, that is, it can be
|
|
installed by non-superusers who have <literal>CREATE</literal> privilege
|
|
on the current database.
|
|
</para>
|
|
|
|
<sect2 id="btree-gin-example-usage">
|
|
<title>Example Usage</title>
|
|
|
|
<programlisting>
|
|
CREATE TABLE test (a int4);
|
|
-- create index
|
|
CREATE INDEX testidx ON test USING GIN (a);
|
|
-- query
|
|
SELECT * FROM test WHERE a < 10;
|
|
</programlisting>
|
|
|
|
</sect2>
|
|
|
|
<sect2 id="btree-gin-authors">
|
|
<title>Authors</title>
|
|
|
|
<para>
|
|
Teodor Sigaev (<email>teodor@stack.net</email>) and
|
|
Oleg Bartunov (<email>oleg@sai.msu.su</email>). See
|
|
<ulink url="http://www.sai.msu.su/~megera/oddmuse/index.cgi/Gin"></ulink>
|
|
for additional information.
|
|
</para>
|
|
|
|
</sect2>
|
|
|
|
</sect1>
|