40 if (
sa->distances[
i].isnull)
128 ScanKey orderbys,
int norderbys)
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",
222 void **fn_extras = NULL;
281 void **fn_extras = NULL;
309 elog(
ERROR,
"missing support function %d for attribute %d of index \"%s\"",
#define InvalidBlockNumber
#define Assert(condition)
#define OidIsValid(objectId)
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)
if(TABLE==NULL||TABLE_index==NULL)
Oid get_func_rettype(Oid funcid)
void MemoryContextReset(MemoryContext context)
void pfree(void *pointer)
void * palloc0(Size size)
#define AllocSetContextCreate
#define ALLOCSET_DEFAULT_SIZES
pairingheap * pairingheap_allocate(pairingheap_comparator compare, void *arg)
MemoryContextSwitchTo(old_ctx)
static int cmp(const chr *x, const chr *y, size_t len)
#define RelationGetNumberOfAttributes(relation)
#define RelationGetRelationName(relation)
#define IndexRelationGetNumberOfKeyAttributes(relation)
FmgrInfo distanceFn[INDEX_MAX_KEYS]
FmgrInfo consistentFn[INDEX_MAX_KEYS]
OffsetNumber * killedItems
IndexOrderByDistance * distances
MemoryContext pageDataCxt
IndexOrderByDistance distances[FLEXIBLE_ARRAY_MEMBER]
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)
#define TupleDescAttr(tupdesc, i)
#define InvalidXLogRecPtr