1996-08-28 03:59:28 +02:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
1999-02-14 00:22:53 +01:00
|
|
|
* index.h
|
1997-09-07 07:04:48 +02:00
|
|
|
* prototypes for index.c.
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
|
|
|
*
|
2000-01-26 06:58:53 +01:00
|
|
|
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
2000-06-30 09:04:23 +02:00
|
|
|
* $Id: index.h,v 1.26 2000/06/30 07:04:06 tgl 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
|
|
|
|
|
1999-07-16 01:04:24 +02:00
|
|
|
#include "access/itup.h"
|
1999-07-16 19:07:40 +02:00
|
|
|
#include "nodes/execnodes.h"
|
1996-08-28 03:59:28 +02:00
|
|
|
|
2000-06-30 09:04:23 +02:00
|
|
|
extern Form_pg_am AccessMethodObjectIdGetForm(Oid accessMethodObjectId,
|
|
|
|
MemoryContext resultCxt);
|
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-09-01 06:40:42 +02: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-09-01 06:40:42 +02: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,
|
1998-09-01 05:29:17 +02:00
|
|
|
AttrNumber *attNums,
|
|
|
|
Oid *classObjectId,
|
1997-09-08 23:56:23 +02:00
|
|
|
Node *predicate,
|
1996-11-13 21:56:15 +01:00
|
|
|
bool islossy,
|
1999-01-21 23:48:20 +01:00
|
|
|
bool unique,
|
1999-05-25 18:15:34 +02:00
|
|
|
bool primary);
|
1996-08-28 03:59:28 +02:00
|
|
|
|
1999-12-10 04:56:14 +01:00
|
|
|
extern void index_drop(Oid indexId);
|
1996-08-28 03:59:28 +02:00
|
|
|
|
1998-09-01 06:40:42 +02:00
|
|
|
extern void FormIndexDatum(int numberOfAttributes,
|
1998-09-01 05:29:17 +02:00
|
|
|
AttrNumber *attributeNumber, HeapTuple heapTuple,
|
1998-08-19 04:04:17 +02:00
|
|
|
TupleDesc heapDescriptor, Datum *datum,
|
1997-09-07 07:04:48 +02:00
|
|
|
char *nullv, FuncIndexInfoPtr fInfo);
|
1996-08-28 03:59:28 +02:00
|
|
|
|
2000-02-18 10:30:20 +01:00
|
|
|
extern void UpdateStats(Oid relid, long reltuples, bool inplace);
|
|
|
|
extern bool IndexesAreActive(Oid relid, bool comfirmCommitted);
|
|
|
|
extern void setRelhasindexInplace(Oid relid, bool hasindex, bool immediate);
|
|
|
|
extern bool SetReindexProcessing(bool processing);
|
|
|
|
extern bool IsReindexProcessing(void);
|
1996-08-28 03:59:28 +02:00
|
|
|
|
1998-09-01 06:40:42 +02: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-09-01 06:40:42 +02:00
|
|
|
extern void index_build(Relation heapRelation, Relation indexRelation,
|
2000-06-18 01:41:51 +02:00
|
|
|
int numberOfAttributes, AttrNumber *attributeNumber,
|
|
|
|
FuncIndexInfo *funcInfo, PredInfo *predInfo,
|
|
|
|
bool unique);
|
1996-08-28 03:59:28 +02:00
|
|
|
|
1997-09-08 04:41:22 +02:00
|
|
|
extern bool IndexIsUnique(Oid indexId);
|
1996-11-13 21:56:15 +01:00
|
|
|
|
2000-02-18 10:30:20 +01:00
|
|
|
extern bool reindex_index(Oid indexId, bool force);
|
|
|
|
extern bool activate_indexes_of_a_table(Oid relid, bool activate);
|
|
|
|
extern bool reindex_relation(Oid relid, bool force);
|
2000-04-12 19:17:23 +02:00
|
|
|
|
1998-09-01 06:40:42 +02:00
|
|
|
#endif /* INDEX_H */
|