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-12-08 07:17:58 +01:00
|
|
|
* $Id: index.h,v 1.31 2000/12/08 06:17:56 inoue 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,
|
2000-07-15 00:18:02 +02:00
|
|
|
char *indexRelationName,
|
|
|
|
IndexInfo *indexInfo,
|
|
|
|
Oid accessMethodObjectId,
|
|
|
|
Oid *classObjectId,
|
|
|
|
bool islossy,
|
|
|
|
bool primary,
|
|
|
|
bool allow_system_table_mods);
|
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
|
|
|
|
2000-07-15 00:18:02 +02:00
|
|
|
extern IndexInfo *BuildIndexInfo(HeapTuple indexTuple);
|
|
|
|
|
|
|
|
extern void FormIndexDatum(IndexInfo *indexInfo,
|
|
|
|
HeapTuple heapTuple,
|
|
|
|
TupleDesc heapDescriptor,
|
|
|
|
MemoryContext resultCxt,
|
|
|
|
Datum *datum,
|
|
|
|
char *nullv);
|
1996-08-28 03:59:28 +02:00
|
|
|
|
2000-11-08 23:10:03 +01:00
|
|
|
extern void UpdateStats(Oid relid, long reltuples);
|
2000-02-18 10:30:20 +01:00
|
|
|
extern bool IndexesAreActive(Oid relid, bool comfirmCommitted);
|
2000-11-08 23:10:03 +01:00
|
|
|
extern void setRelhasindex(Oid relid, bool hasindex);
|
2000-12-08 07:17:58 +01:00
|
|
|
#ifndef OLD_FILE_NAMING
|
|
|
|
extern void setNewRelfilenode(Relation relation);
|
|
|
|
#endif /* OLD_FILE_NAMING */
|
2000-02-18 10:30:20 +01:00
|
|
|
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 index_build(Relation heapRelation, Relation indexRelation,
|
2000-07-15 00:18:02 +02:00
|
|
|
IndexInfo *indexInfo, Node *oldPred);
|
1996-11-13 21:56:15 +01:00
|
|
|
|
2000-12-08 07:17:58 +01:00
|
|
|
extern bool reindex_index(Oid indexId, bool force, bool inplace);
|
2000-02-18 10:30:20 +01:00
|
|
|
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 */
|