@ -7,19 +7,20 @@
* Portions Copyright ( c ) 1996 - 2008 , PostgreSQL Global Development Group
* Portions Copyright ( c ) 1994 , Regents of the University of California
*
* $ PostgreSQL : pgsql / src / include / access / genam . h , v 1.73 2008 / 06 / 08 22 : 41 : 04 tgl Exp $
* $ PostgreSQL : pgsql / src / include / access / genam . h , v 1.74 2008 / 06 / 19 00 : 46 : 05 alvherre Exp $
*
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
*/
# ifndef GENAM_H
# define GENAM_H
# include "access/relscan.h"
# include "access/sdir.h"
# include "access/skey.h"
# include "nodes/tidbitmap.h"
# include "storage/buf.h"
# include "storage/lock.h"
# include "utils/rel.h"
# include "utils/relcache.h"
# include "utils/snapshot.h"
/*
* Struct for statistics returned by ambuild
@ -73,21 +74,21 @@ typedef struct IndexBulkDeleteResult
/* Typedef for callback function to determine if a tuple is bulk-deletable */
typedef bool ( * IndexBulkDeleteCallback ) ( ItemPointer itemptr , void * state ) ;
/* Struct for heap-or-index scans of system tables */
typedef struct SysScanDescData
{
Relation heap_rel ; /* catalog being scanned */
Relation irel ; /* NULL if doing heap scan */
HeapScanDesc scan ; /* only valid in heap-scan case */
IndexScanDesc iscan ; /* only valid in index-scan case */
} SysScanDescData ;
typedef SysScanDescData * SysScanDesc ;
/* struct definitions appear in relscan.h */
typedef struct IndexScanDescData * IndexScanDesc ;
typedef struct SysScanDescData * SysScanDesc ;
/*
* generalized index_ interface routines ( in indexam . c )
*/
/*
* IndexScanIsValid
* True iff the index scan is valid .
*/
# define IndexScanIsValid(scan) PointerIsValid(scan)
extern Relation index_open ( Oid relationId , LOCKMODE lockmode ) ;
extern void index_close ( Relation relation , LOCKMODE lockmode ) ;