]> begriffs open source - ai-pg/blob - full-docs/txt/btree-gin.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / btree-gin.txt
1
2 F.7. btree_gin — GIN operator classes with B-tree behavior #
3
4    F.7.1. Example Usage
5    F.7.2. Authors
6
7    btree_gin provides GIN operator classes that implement B-tree
8    equivalent behavior for the data types int2, int4, int8, float4,
9    float8, timestamp with time zone, timestamp without time zone, time
10    with time zone, time without time zone, date, interval, oid, money,
11    "char", varchar, text, bytea, bit, varbit, macaddr, macaddr8, inet,
12    cidr, uuid, name, bool, bpchar, and all enum types.
13
14    In general, these operator classes will not outperform the equivalent
15    standard B-tree index methods, and they lack one major feature of the
16    standard B-tree code: the ability to enforce uniqueness. However, they
17    are useful for GIN testing and as a base for developing other GIN
18    operator classes. Also, for queries that test both a GIN-indexable
19    column and a B-tree-indexable column, it might be more efficient to
20    create a multicolumn GIN index that uses one of these operator classes
21    than to create two separate indexes that would have to be combined via
22    bitmap ANDing.
23
24    This module is considered “trusted”, that is, it can be installed by
25    non-superusers who have CREATE privilege on the current database.
26
27 F.7.1. Example Usage #
28
29 CREATE TABLE test (a int4);
30 -- create index
31 CREATE INDEX testidx ON test USING GIN (a);
32 -- query
33 SELECT * FROM test WHERE a < 10;
34
35 F.7.2. Authors #
36
37    Teodor Sigaev (<teodor@stack.net>) and Oleg Bartunov
38    (<oleg@sai.msu.su>). See
39    http://www.sai.msu.su/~megera/oddmuse/index.cgi/Gin for additional
40    information.