KNNGIST, otherwise known as order-by-operator support for GIST.
Tom Lane <tgl@sss.pgh.pa.us>
KNNGIST, otherwise known as order-by-operator support for GIST. This commit represents a rather heavily editorialized version of Teodor's builtin_knngist_itself-0.8.2 and builtin_knngist_proc-0.8.1 patches. I redid the opclass API to add a separate Distance method instead of turning the Consistent method into an illogical mess, fixed some bit-rot in the rbtree interfaces, and generally worked over the code style and comments. There's still no non-code documentation to speak of, but I'll work on that separately. Some contrib-module changes are also yet to come (right now, point <-> point is the only KNN-ified operator). Teodor Sigaev and Tom Lane
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/gist/gist.c | modified | +10 −0 |
| src/backend/access/gist/gistget.c | modified | +434 −385 |
| src/backend/access/gist/gistproc.c | modified | +95 −2 |
| src/backend/access/gist/gistscan.c | modified | +137 −42 |
| src/include/access/gist.h | modified | +6 −4 |
| src/include/access/gist_private.h | modified | +80 −37 |
| src/include/catalog/catversion.h | modified | +1 −1 |
| src/include/catalog/pg_am.h | modified | +1 −1 |
| src/include/catalog/pg_amop.h | modified | +1 −0 |
| src/include/catalog/pg_amproc.h | modified | +1 −0 |
| src/include/catalog/pg_proc.h | modified | +3 −1 |
| src/include/utils/geo_decls.h | modified | +1 −0 |
| src/test/regress/expected/create_index.out | modified | +136 −0 |
| src/test/regress/expected/opr_sanity.out | modified | +16 −13 |
| src/test/regress/sql/create_index.sql | modified | +36 −0 |
| src/test/regress/sql/opr_sanity.sql | modified | +14 −12 |