PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/gist_private.h"
#include "access/gistscan.h"
#include "access/relscan.h"
#include "utils/float.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
#include "utils/rel.h"
Go to the source code of this file.
Functions | |
static int | pairingheap_GISTSearchItem_cmp (const pairingheap_node *a, const pairingheap_node *b, void *arg) |
IndexScanDesc | gistbeginscan (Relation r, int nkeys, int norderbys) |
void | gistrescan (IndexScanDesc scan, ScanKey key, int nkeys, ScanKey orderbys, int norderbys) |
void | gistendscan (IndexScanDesc scan) |
IndexScanDesc gistbeginscan | ( | Relation | r, |
int | nkeys, | ||
int | norderbys | ||
) |
Definition at line 74 of file gistscan.c.
References createTempGistContext(), GISTScanOpaqueData::curBlkno, GISTScanOpaqueData::curPageLSN, GISTScanOpaqueData::distances, GISTScanOpaqueData::giststate, IndexScanDescData::indexRelation, initGISTstate(), InvalidBlockNumber, InvalidXLogRecPtr, GISTScanOpaqueData::killedItems, MemoryContextSwitchTo(), IndexScanDescData::numberOfOrderBys, GISTScanOpaqueData::numKilled, IndexScanDescData::opaque, palloc(), palloc0(), GISTScanOpaqueData::qual_ok, GISTScanOpaqueData::queue, GISTScanOpaqueData::queueCxt, RelationGetIndexScan(), GISTSTATE::scanCxt, GISTSTATE::tempCxt, IndexScanDescData::xs_orderbynulls, and IndexScanDescData::xs_orderbyvals.
Referenced by gisthandler().
void gistendscan | ( | IndexScanDesc | scan | ) |
Definition at line 347 of file gistscan.c.
References freeGISTstate(), GISTScanOpaqueData::giststate, and IndexScanDescData::opaque.
Referenced by gisthandler().
void gistrescan | ( | IndexScanDesc | scan, |
ScanKey | key, | ||
int | nkeys, | ||
ScanKey | orderbys, | ||
int | norderbys | ||
) |
Definition at line 127 of file gistscan.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, Assert, GISTSTATE::consistentFn, CreateTemplateTupleDesc(), GISTSTATE::distanceFn, elog, ERROR, GISTSTATE::fetchTupdesc, GISTScanOpaqueData::firstCall, fmgr_info_copy(), FmgrInfo::fn_extra, FmgrInfo::fn_oid, get_func_rettype(), GIST_DISTANCE_PROC, GISTScanOpaqueData::giststate, i, if(), IndexScanDescData::indexRelation, IndexRelationGetNumberOfKeyAttributes, sort-test::key, IndexScanDescData::keyData, GISTSTATE::leafTupdesc, MemoryContextReset(), MemoryContextSwitchTo(), IndexScanDescData::numberOfKeys, IndexScanDescData::numberOfOrderBys, OidIsValid, IndexScanDescData::opaque, IndexScanDescData::orderByData, GISTScanOpaqueData::orderByTypes, GISTScanOpaqueData::pageDataCxt, pairingheap_allocate(), pairingheap_GISTSearchItem_cmp(), palloc(), pfree(), GISTScanOpaqueData::qual_ok, GISTScanOpaqueData::queue, GISTScanOpaqueData::queueCxt, RelationData::rd_opcintype, RelationGetNumberOfAttributes, RelationGetRelationName, GISTSTATE::scanCxt, ScanKeyData::sk_attno, ScanKeyData::sk_flags, ScanKeyData::sk_func, SK_ISNULL, SK_SEARCHNOTNULL, SK_SEARCHNULL, TupleDescAttr, TupleDescInitEntry(), IndexScanDescData::xs_hitup, IndexScanDescData::xs_hitupdesc, and IndexScanDescData::xs_want_itup.
Referenced by gisthandler().
|
static |
Definition at line 30 of file gistscan.c.
References a, arg, b, cmp(), GISTSearchItem::distances, float8_cmp_internal(), GISTSearchItemIsHeap, i, IndexOrderByDistance::isnull, IndexScanDescData::numberOfOrderBys, and IndexOrderByDistance::value.
Referenced by gistrescan().