1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Add btree_gin contrib module.

Teodor Sigaev and Oleg Bartunov
This commit is contained in:
Tom Lane
2009-03-25 23:20:01 +00:00
parent 87b8db3774
commit 9151e1bb06
57 changed files with 2781 additions and 3 deletions

View File

@ -0,0 +1,58 @@
<!-- $PostgreSQL: pgsql/doc/src/sgml/btree-gin.sgml,v 1.1 2009/03/25 23:20:01 tgl Exp $ -->
<sect1 id="btree-gin">
<title>btree_gin</title>
<indexterm zone="btree-gin">
<primary>btree_gin</primary>
</indexterm>
<para>
<filename>btree_gin</> provides sample GIN operator classes that
implement B-Tree equivalent behavior for the data types
<type>int2</>, <type>int4</>, <type>int8</>, <type>float4</>,
<type>float8</>, <type>timestamp with time zone</>,
<type>timestamp without time zone</>, <type>time with time zone</>,
<type>time without time zone</>, <type>date</>, <type>interval</>,
<type>oid</>, <type>money</>, <type>"char"</>,
<type>varchar</>, <type>text</>, <type>bytea</>, <type>bit</>,
<type>varbit</>, <type>macaddr</>, <type>inet</>, and <type>cidr</>.
</para>
<para>
In general, these operator classes will not outperform the equivalent
standard btree index methods, and they lack one major feature of the
standard btree 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 btree-indexable column, it might be more efficient to create
a multi-column GIN index that uses one of these opclasses than to create
two separate indexes that would have to be combined via bitmap ANDing.
</para>
<sect2>
<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 &lt; 10;
</programlisting>
</sect2>
<sect2>
<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>

View File

@ -1,4 +1,4 @@
<!-- $PostgreSQL: pgsql/doc/src/sgml/contrib.sgml,v 1.11 2009/01/04 22:19:59 tgl Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/contrib.sgml,v 1.12 2009/03/25 23:20:01 tgl Exp $ -->
<appendix id="contrib">
<title>Additional Supplied Modules</title>
@ -80,6 +80,7 @@ psql -d dbname -f <replaceable>SHAREDIR</>/contrib/<replaceable>module</>.sql
&adminpack;
&auto-explain;
&btree-gin;
&btree-gist;
&chkpass;
&citext;

View File

@ -1,4 +1,4 @@
<!-- $PostgreSQL: pgsql/doc/src/sgml/filelist.sgml,v 1.59 2009/01/04 22:19:59 tgl Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/filelist.sgml,v 1.60 2009/03/25 23:20:01 tgl Exp $ -->
<!entity history SYSTEM "history.sgml">
<!entity info SYSTEM "info.sgml">
@ -93,6 +93,7 @@
<!entity contrib SYSTEM "contrib.sgml">
<!entity adminpack SYSTEM "adminpack.sgml">
<!entity auto-explain SYSTEM "auto-explain.sgml">
<!entity btree-gin SYSTEM "btree-gin.sgml">
<!entity btree-gist SYSTEM "btree-gist.sgml">
<!entity chkpass SYSTEM "chkpass.sgml">
<!entity citext SYSTEM "citext.sgml">