Add BRIN infrastructure for "inclusion" opclasses
Alvaro Herrera <alvherre@alvh.no-ip.org>
Add BRIN infrastructure for "inclusion" opclasses This lets BRIN be used with R-Tree-like indexing strategies. Also provided are operator classes for range types, box and inet/cidr. The infrastructure provided here should be sufficient to create operator classes for similar datatypes; for instance, opclasses for PostGIS geometries should be doable, though we didn't try to implement one. (A box/point opclass was also submitted, but we ripped it out before commit because the handling of floating point comparisons in existing code is inconsistent and would generate corrupt indexes.) Author: Emre Hasegeli. Cosmetic changes by me Review: Andreas Karlsson
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/brin.sgml | modified | +52 −1 |
| src/backend/access/brin/brin.c | modified | +17 −73 |
| src/backend/access/brin/brin_inclusion.c | added | +696 −0 |
| src/backend/access/brin/brin_minmax.c | modified | +7 −0 |
| src/backend/access/brin/Makefile | modified | +1 −1 |
| src/backend/utils/adt/network_gist.c | modified | +2 −2 |
| src/include/access/brin_internal.h | modified | +0 −6 |
| src/include/access/stratnum.h | modified | +2 −2 |
| src/include/catalog/catversion.h | modified | +1 −1 |
| src/include/catalog/pg_am.h | modified | +2 −1 |
| src/include/catalog/pg_amop.h | modified | +37 −0 |
| src/include/catalog/pg_amproc.h | modified | +23 −0 |
| src/include/catalog/pg_opclass.h | modified | +5 −1 |
| src/include/catalog/pg_opfamily.h | modified | +3 −0 |
| src/include/catalog/pg_proc.h | modified | +10 −0 |
| src/test/regress/expected/brin.out | modified | +23 −8 |
| src/test/regress/expected/opr_sanity.out | modified | +24 −1 |
| src/test/regress/sql/brin.sql | modified | +23 −8 |