1996-08-27 23:50:29 +02:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
|
|
|
* genam.h--
|
1997-09-07 07:04:48 +02:00
|
|
|
* POSTGRES general access method definitions.
|
1996-08-27 23:50:29 +02:00
|
|
|
*
|
|
|
|
*
|
|
|
|
* Copyright (c) 1994, Regents of the University of California
|
|
|
|
*
|
1998-02-26 05:46:47 +01:00
|
|
|
* $Id: genam.h,v 1.12 1998/02/26 04:39:52 momjian Exp $
|
1996-08-27 23:50:29 +02:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
1997-09-07 07:04:48 +02:00
|
|
|
#ifndef GENAM_H
|
1996-08-27 23:50:29 +02:00
|
|
|
#define GENAM_H
|
|
|
|
|
1996-11-05 09:18:44 +01:00
|
|
|
#include <access/sdir.h>
|
|
|
|
#include <access/funcindex.h>
|
|
|
|
#include <access/relscan.h>
|
|
|
|
#include <access/itup.h>
|
1996-08-27 23:50:29 +02:00
|
|
|
|
|
|
|
/* ----------------
|
1997-09-07 07:04:48 +02:00
|
|
|
* generalized index_ interface routines
|
1996-08-27 23:50:29 +02:00
|
|
|
* ----------------
|
|
|
|
*/
|
|
|
|
extern Relation index_open(Oid relationId);
|
|
|
|
extern Relation index_openr(char *relationName);
|
1997-09-08 04:41:22 +02:00
|
|
|
extern void index_close(Relation relation);
|
1998-02-26 05:46:47 +01:00
|
|
|
extern InsertIndexResult
|
|
|
|
index_insert(Relation relation,
|
1997-09-08 23:56:23 +02:00
|
|
|
Datum *datum, char *nulls,
|
1997-09-07 07:04:48 +02:00
|
|
|
ItemPointer heap_t_ctid,
|
|
|
|
Relation heapRel);
|
1997-09-08 04:41:22 +02:00
|
|
|
extern void index_delete(Relation relation, ItemPointer indexItem);
|
1998-02-26 05:46:47 +01:00
|
|
|
extern IndexScanDesc
|
|
|
|
index_beginscan(Relation relation, bool scanFromEnd,
|
1997-09-07 07:04:48 +02:00
|
|
|
uint16 numberOfKeys, ScanKey key);
|
1997-09-08 04:41:22 +02:00
|
|
|
extern void index_rescan(IndexScanDesc scan, bool scanFromEnd, ScanKey key);
|
|
|
|
extern void index_endscan(IndexScanDesc scan);
|
1998-02-26 05:46:47 +01:00
|
|
|
extern RetrieveIndexResult
|
|
|
|
index_getnext(IndexScanDesc scan,
|
1997-09-07 07:04:48 +02:00
|
|
|
ScanDirection direction);
|
1998-02-26 05:46:47 +01:00
|
|
|
extern RegProcedure
|
|
|
|
index_getprocid(Relation irel, AttrNumber attnum,
|
1997-09-07 07:04:48 +02:00
|
|
|
uint16 procnum);
|
1998-02-26 05:46:47 +01:00
|
|
|
extern Datum
|
|
|
|
GetIndexValue(HeapTuple tuple, TupleDesc hTupDesc,
|
1997-09-08 23:56:23 +02:00
|
|
|
int attOff, AttrNumber attrNums[], FuncIndexInfo *fInfo,
|
|
|
|
bool *attNull, Buffer buffer);
|
1996-08-27 23:50:29 +02:00
|
|
|
|
|
|
|
/* in genam.c */
|
1998-02-26 05:46:47 +01:00
|
|
|
extern IndexScanDesc
|
|
|
|
RelationGetIndexScan(Relation relation, bool scanFromEnd,
|
1997-09-07 07:04:48 +02:00
|
|
|
uint16 numberOfKeys, ScanKey key);
|
1997-09-08 04:41:22 +02:00
|
|
|
extern void IndexScanMarkPosition(IndexScanDesc scan);
|
|
|
|
extern void IndexScanRestorePosition(IndexScanDesc scan);
|
1996-08-27 23:50:29 +02:00
|
|
|
|
1997-09-07 07:04:48 +02:00
|
|
|
#endif /* GENAM_H */
|