postgresql/src/include/catalog/index.h

78 lines
2.1 KiB
C
Raw Normal View History

/*-------------------------------------------------------------------------
*
* index.h
* prototypes for index.c.
*
*
2002-06-20 22:29:54 +02:00
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: index.h,v 1.51 2003/05/28 16:04:00 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef INDEX_H
#define INDEX_H
#include "access/itup.h"
#include "catalog/pg_index.h"
1999-07-16 19:07:40 +02:00
#include "nodes/execnodes.h"
#define DEFAULT_INDEX_TYPE "btree"
/* Typedef for callback function for IndexBuildHeapScan */
typedef void (*IndexBuildCallback) (Relation index,
HeapTuple htup,
Datum *attdata,
char *nulls,
bool tupleIsAlive,
void *state);
extern Oid index_create(Oid heapRelationId,
const char *indexRelationName,
2001-03-22 05:01:46 +01:00
IndexInfo *indexInfo,
Oid accessMethodObjectId,
Oid *classObjectId,
bool primary,
bool isconstraint,
2001-03-22 05:01:46 +01:00
bool allow_system_table_mods);
extern void index_drop(Oid indexId);
extern IndexInfo *BuildIndexInfo(Relation index);
extern void FormIndexDatum(IndexInfo *indexInfo,
2001-03-22 05:01:46 +01:00
HeapTuple heapTuple,
TupleDesc heapDescriptor,
EState *estate,
2001-03-22 05:01:46 +01:00
Datum *datum,
char *nullv);
extern void UpdateStats(Oid relid, double reltuples);
extern bool IndexesAreActive(Relation heaprel);
extern void setRelhasindex(Oid relid, bool hasindex,
bool isprimary, Oid reltoastidxid);
2001-03-22 05:01:46 +01:00
2000-12-08 07:17:58 +01:00
extern void setNewRelfilenode(Relation relation);
2001-03-22 05:01:46 +01:00
2000-02-18 10:30:20 +01:00
extern bool SetReindexProcessing(bool processing);
extern bool IsReindexProcessing(void);
extern void index_build(Relation heapRelation, Relation indexRelation,
IndexInfo *indexInfo);
extern double IndexBuildHeapScan(Relation heapRelation,
Relation indexRelation,
IndexInfo *indexInfo,
IndexBuildCallback callback,
void *callback_state);
extern bool activate_indexes_of_a_table(Relation heaprel, bool activate);
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 reindex_relation(Oid relid, bool force);
#endif /* INDEX_H */