40 if (
sa->distances[
i].isnull)
42 if (!
sb->distances[
i].isnull)
45 else if (
sb->distances[
i].isnull)
52 sb->distances[
i].value);
94 so->giststate = giststate;
128 ScanKey orderbys,
int norderbys)
151 Assert(
so->queueCxt ==
so->giststate->scanCxt);
154 else if (
so->queueCxt ==
so->giststate->scanCxt)
158 "GiST queue context",
189 for (attno = 1; attno <=
nkeyatts; attno++)
196 for (; attno <= natts; attno++)
201 attno - 1)->atttypid,
208 "GiST page data context",
217 so->firstCall =
true;
260 &(
so->giststate->consistentFn[
skey->sk_attno - 1]),
261 so->giststate->scanCxt);
305 FmgrInfo *finfo = &(
so->giststate->distanceFn[
skey->sk_attno - 1]);
309 elog(
ERROR,
"missing support function %d for attribute %d of index \"%s\"",
#define InvalidBlockNumber
#define Assert(condition)
#define OidIsValid(objectId)
#define palloc_array(type, count)
#define palloc0_array(type, count)
#define palloc0_object(type)
int float8_cmp_internal(float8 a, float8 b)
void fmgr_info_copy(FmgrInfo *dstinfo, FmgrInfo *srcinfo, MemoryContext destcxt)
IndexScanDesc RelationGetIndexScan(Relation indexRelation, int nkeys, int norderbys)
struct IndexScanDescData * IndexScanDesc
GISTSTATE * initGISTstate(Relation index)
MemoryContext createTempGistContext(void)
void freeGISTstate(GISTSTATE *giststate)
#define GIST_DISTANCE_PROC
GISTScanOpaqueData * GISTScanOpaque
#define GISTSearchItemIsHeap(item)
IndexScanDesc gistbeginscan(Relation r, int nkeys, int norderbys)
void gistendscan(IndexScanDesc scan)
void gistrescan(IndexScanDesc scan, ScanKey key, int nkeys, ScanKey orderbys, int norderbys)
static int pairingheap_GISTSearchItem_cmp(const pairingheap_node *a, const pairingheap_node *b, void *arg)
Oid get_func_rettype(Oid funcid)
void MemoryContextReset(MemoryContext context)
void pfree(void *pointer)
#define AllocSetContextCreate
#define ALLOCSET_DEFAULT_SIZES
pairingheap * pairingheap_allocate(pairingheap_comparator compare, void *arg)
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
static int cmp(const chr *x, const chr *y, size_t len)
#define RelationGetNumberOfAttributes(relation)
#define RelationGetRelationName(relation)
#define IndexRelationGetNumberOfKeyAttributes(relation)
struct ScanKeyData * keyData
struct ScanKeyData * orderByData
struct TupleDescData * xs_hitupdesc
TupleDesc CreateTemplateTupleDesc(int natts)
void TupleDescInitEntry(TupleDesc desc, AttrNumber attributeNumber, const char *attributeName, Oid oidtypeid, int32 typmod, int attdim)
static FormData_pg_attribute * TupleDescAttr(TupleDesc tupdesc, int i)
#define InvalidXLogRecPtr