1996-08-28 03:59:28 +02:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
|
|
|
* index.h--
|
1997-09-07 07:04:48 +02:00
|
|
|
* prototypes for index.c.
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
|
|
|
*
|
|
|
|
* Copyright (c) 1994, Regents of the University of California
|
|
|
|
*
|
1998-02-26 05:46:47 +01:00
|
|
|
* $Id: index.h,v 1.10 1998/02/26 04:40:40 momjian Exp $
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
1997-09-07 07:04:48 +02:00
|
|
|
#ifndef INDEX_H
|
1996-08-28 03:59:28 +02:00
|
|
|
#define INDEX_H
|
|
|
|
|
1996-11-05 09:18:44 +01:00
|
|
|
#include <nodes/execnodes.h>
|
|
|
|
#include <nodes/parsenodes.h>
|
|
|
|
#include <access/itup.h>
|
|
|
|
#include <access/funcindex.h>
|
1996-08-28 03:59:28 +02:00
|
|
|
|
1998-02-26 05:46:47 +01:00
|
|
|
extern Form_pg_am AccessMethodObjectIdGetAccessMethodTupleForm(Oid accessMethodObjectId);
|
1996-08-28 03:59:28 +02:00
|
|
|
|
1998-01-24 23:50:57 +01:00
|
|
|
extern void UpdateIndexPredicate(Oid indexoid, Node *oldPred, Node *predicate);
|
1996-08-28 03:59:28 +02:00
|
|
|
|
1998-02-26 05:46:47 +01:00
|
|
|
extern void
|
|
|
|
InitIndexStrategy(int numatts,
|
1997-09-07 07:04:48 +02:00
|
|
|
Relation indexRelation,
|
|
|
|
Oid accessMethodObjectId);
|
1996-08-28 03:59:28 +02:00
|
|
|
|
1998-02-26 05:46:47 +01:00
|
|
|
extern void
|
|
|
|
index_create(char *heapRelationName,
|
1997-09-07 07:04:48 +02:00
|
|
|
char *indexRelationName,
|
1997-09-08 23:56:23 +02:00
|
|
|
FuncIndexInfo *funcInfo,
|
|
|
|
List *attributeList,
|
1996-08-28 03:59:28 +02:00
|
|
|
Oid accessMethodObjectId,
|
1997-09-07 07:04:48 +02:00
|
|
|
int numatts,
|
1996-08-28 03:59:28 +02:00
|
|
|
AttrNumber attNums[],
|
1997-09-07 07:04:48 +02:00
|
|
|
Oid classObjectId[],
|
1996-08-28 03:59:28 +02:00
|
|
|
uint16 parameterCount,
|
1997-09-08 23:56:23 +02:00
|
|
|
Datum *parameter,
|
|
|
|
Node *predicate,
|
1996-11-13 21:56:15 +01:00
|
|
|
bool islossy,
|
|
|
|
bool unique);
|
1996-08-28 03:59:28 +02:00
|
|
|
|
1997-09-08 04:41:22 +02:00
|
|
|
extern void index_destroy(Oid indexId);
|
1996-08-28 03:59:28 +02:00
|
|
|
|
1998-02-26 05:46:47 +01:00
|
|
|
extern void
|
|
|
|
FormIndexDatum(int numberOfAttributes,
|
1997-09-07 07:04:48 +02:00
|
|
|
AttrNumber attributeNumber[], HeapTuple heapTuple,
|
1997-09-08 23:56:23 +02:00
|
|
|
TupleDesc heapDescriptor, Buffer buffer, Datum *datum,
|
1997-09-07 07:04:48 +02:00
|
|
|
char *nullv, FuncIndexInfoPtr fInfo);
|
1996-08-28 03:59:28 +02:00
|
|
|
|
1997-09-08 04:41:22 +02:00
|
|
|
extern void UpdateStats(Oid relid, long reltuples, bool hasindex);
|
1996-08-28 03:59:28 +02:00
|
|
|
|
1998-02-26 05:46:47 +01:00
|
|
|
extern void
|
|
|
|
FillDummyExprContext(ExprContext *econtext, TupleTableSlot *slot,
|
1997-09-07 07:04:48 +02:00
|
|
|
TupleDesc tupdesc, Buffer buffer);
|
1996-08-28 03:59:28 +02:00
|
|
|
|
1998-02-26 05:46:47 +01:00
|
|
|
extern void
|
|
|
|
index_build(Relation heapRelation, Relation indexRelation,
|
1997-09-07 07:04:48 +02:00
|
|
|
int numberOfAttributes, AttrNumber attributeNumber[],
|
1997-09-08 23:56:23 +02:00
|
|
|
uint16 parameterCount, Datum *parameter, FuncIndexInfo *funcInfo,
|
|
|
|
PredInfo *predInfo);
|
1996-08-28 03:59:28 +02:00
|
|
|
|
1997-09-08 04:41:22 +02:00
|
|
|
extern bool IndexIsUnique(Oid indexId);
|
|
|
|
extern bool IndexIsUniqueNoCache(Oid indexId);
|
1996-11-13 21:56:15 +01:00
|
|
|
|
1997-09-07 07:04:48 +02:00
|
|
|
#endif /* INDEX_H */
|