mirror of
https://github.com/postgres/postgres.git
synced 2025-10-24 01:29:19 +03:00
pass-by-ref data types --- eg, an index on lower(textfield) --- no longer leak memory during index creation or update. Clean up a lot of redundant code ... did you know that copy, vacuum, truncate, reindex, extend index, and bootstrap each basically duplicated the main executor's logic for extracting information about an index and preparing index entries? Functional indexes should be a little faster now too, due to removal of repeated function lookups. CREATE INDEX 'opt_type' clause is deimplemented by these changes, but I haven't removed it from the parser yet (need to merge with Thomas' latest change set first).
51 lines
1.7 KiB
C
51 lines
1.7 KiB
C
/*-------------------------------------------------------------------------
|
|
*
|
|
* genam.h
|
|
* POSTGRES general access method definitions.
|
|
*
|
|
*
|
|
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
|
*
|
|
* $Id: genam.h,v 1.24 2000/07/14 22:17:53 tgl Exp $
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
#ifndef GENAM_H
|
|
#define GENAM_H
|
|
|
|
#include "access/itup.h"
|
|
#include "access/relscan.h"
|
|
#include "access/sdir.h"
|
|
|
|
/* ----------------
|
|
* generalized index_ interface routines
|
|
* ----------------
|
|
*/
|
|
extern Relation index_open(Oid relationId);
|
|
extern Relation index_openr(char *relationName);
|
|
extern void index_close(Relation relation);
|
|
extern InsertIndexResult index_insert(Relation relation,
|
|
Datum *datum, char *nulls,
|
|
ItemPointer heap_t_ctid,
|
|
Relation heapRel);
|
|
extern void index_delete(Relation relation, ItemPointer indexItem);
|
|
extern IndexScanDesc index_beginscan(Relation relation, bool scanFromEnd,
|
|
uint16 numberOfKeys, ScanKey key);
|
|
extern void index_rescan(IndexScanDesc scan, bool scanFromEnd, ScanKey key);
|
|
extern void index_endscan(IndexScanDesc scan);
|
|
extern void index_markpos(IndexScanDesc scan);
|
|
extern void index_restrpos(IndexScanDesc scan);
|
|
extern RetrieveIndexResult index_getnext(IndexScanDesc scan,
|
|
ScanDirection direction);
|
|
extern RegProcedure index_cost_estimator(Relation relation);
|
|
extern RegProcedure index_getprocid(Relation irel, AttrNumber attnum,
|
|
uint16 procnum);
|
|
|
|
/* in genam.c */
|
|
extern IndexScanDesc RelationGetIndexScan(Relation relation, bool scanFromEnd,
|
|
uint16 numberOfKeys, ScanKey key);
|
|
extern void IndexScanEnd(IndexScanDesc scan);
|
|
|
|
#endif /* GENAM_H */
|