Database Reference
In-Depth Information
Btree GiST - btree_gist
In computing,
Generalized Search Tree
(
GiST
) is a data structure that can be used to
build search tree in many types of data. The
btree_gist
extension provides the GiST
index operator that implements the equivalent B-tree behavior for these data types:
int2
,
int4
,
int8
,
float4
,
float8
,
numeric
,
timestamp
,
time
,
date
,
interval
,
oid
,
money
,
char
,
varchar
,
text
,
bytea
,
bit
,
varbit
,
macaddr
,
inet
, and
cidr
.
Most of the time, these operator classes will not exceed B-tree index methods and don't
have the ability to enforce uniqueness.
These operator classes are useful when a multicolumn GiST index is required.
For example:
$ heroku pg:psql --app your-app-name
CREATE EXTENSION btree_gist;
CREATE TABLE drinks (quantity int4);
CREATE INDEX drinks_quantity_index ON drinks USING gist
(quantity);
For more details visit the documentation at
http://www.postgresql.org/docs/current/static/