index.h 1.74 KB
Newer Older
1 2 3 4 5 6 7 8
/*-------------------------------------------------------------------------
 *
 * index.h--
 *    prototypes for index.c.
 *
 *
 * Copyright (c) 1994, Regents of the University of California
 *
9
 * $Id: index.h,v 1.2 1996/11/03 12:12:28 scrappy Exp $
10 11 12 13 14 15 16
 *
 *-------------------------------------------------------------------------
 */
#ifndef	INDEX_H 
#define INDEX_H

#include "nodes/execnodes.h"
17 18
#include "access/htup.h"
#include "access/itup.h"
19
#include "nodes/parsenodes.h"
20
#include "storage/buf.h"
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62

extern Form_pg_am
AccessMethodObjectIdGetAccessMethodTupleForm(Oid accessMethodObjectId);

extern void
UpdateIndexPredicate(Oid indexoid, Node *oldPred, Node *predicate);

extern void InitIndexStrategy(int numatts,
			      Relation indexRelation,
			      Oid accessMethodObjectId);

extern void index_create(char *heapRelationName, 
			 char* indexRelationName,
			 FuncIndexInfo *funcInfo, 
			 TypeName *IndexKeyType,
			 Oid accessMethodObjectId,
			 int numatts, 
			 AttrNumber attNums[],
			 Oid classObjectId[], 
			 uint16 parameterCount,
			 Datum *parameter, 
			 Node *predicate,
			 bool islossy);

extern void index_destroy(Oid indexId);

extern void FormIndexDatum(int numberOfAttributes,
	AttrNumber attributeNumber[], HeapTuple heapTuple,
	TupleDesc heapDescriptor, Buffer buffer, Datum *datum,
	char *nullv, FuncIndexInfoPtr fInfo);

extern void UpdateStats(Oid relid, long reltuples, bool hasindex);

extern void FillDummyExprContext(ExprContext *econtext, TupleTableSlot *slot,
			  TupleDesc tupdesc, Buffer buffer);

extern void index_build(Relation heapRelation, Relation indexRelation,
	int numberOfAttributes, AttrNumber attributeNumber[],
	uint16 parameterCount, Datum *parameter, FuncIndexInfo *funcInfo,
	PredInfo *predInfo);

#endif /* INDEX_H */