diff options
Diffstat (limited to 'src/include/access/heapam.h')
-rw-r--r-- | src/include/access/heapam.h | 145 |
1 files changed, 71 insertions, 74 deletions
diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h index 15f5685e86a..c82b23e742c 100644 --- a/src/include/access/heapam.h +++ b/src/include/access/heapam.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: heapam.h,v 1.12 1997/09/07 04:55:55 momjian Exp $ + * $Id: heapam.h,v 1.13 1997/09/08 02:34:10 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -25,57 +25,54 @@ typedef struct HeapAccessStatisticsData { - time_t init_global_timestamp; /* time global statistics - * started */ - time_t local_reset_timestamp; /* last time local reset - * was done */ - time_t last_request_timestamp; /* last time stats were - * requested */ - - int global_open; - int global_openr; - int global_close; - int global_beginscan; - int global_rescan; - int global_endscan; - int global_getnext; - int global_fetch; - int global_insert; - int global_delete; - int global_replace; - int global_markpos; - int global_restrpos; - int global_BufferGetRelation; - int global_RelationIdGetRelation; - int global_RelationIdGetRelation_Buf; - int global_RelationNameGetRelation; - int global_getreldesc; - int global_heapgettup; - int global_RelationPutHeapTuple; - int global_RelationPutLongHeapTuple; - - int local_open; - int local_openr; - int local_close; - int local_beginscan; - int local_rescan; - int local_endscan; - int local_getnext; - int local_fetch; - int local_insert; - int local_delete; - int local_replace; - int local_markpos; - int local_restrpos; - int local_BufferGetRelation; - int local_RelationIdGetRelation; - int local_RelationIdGetRelation_Buf; - int local_RelationNameGetRelation; - int local_getreldesc; - int local_heapgettup; - int local_RelationPutHeapTuple; - int local_RelationPutLongHeapTuple; -} HeapAccessStatisticsData; + time_t init_global_timestamp; /* time global statistics started */ + time_t local_reset_timestamp; /* last time local reset was done */ + time_t last_request_timestamp; /* last time stats were requested */ + + int global_open; + int global_openr; + int global_close; + int global_beginscan; + int global_rescan; + int global_endscan; + int global_getnext; + int global_fetch; + int global_insert; + int global_delete; + int global_replace; + int global_markpos; + int global_restrpos; + int global_BufferGetRelation; + int global_RelationIdGetRelation; + int global_RelationIdGetRelation_Buf; + int global_RelationNameGetRelation; + int global_getreldesc; + int global_heapgettup; + int global_RelationPutHeapTuple; + int global_RelationPutLongHeapTuple; + + int local_open; + int local_openr; + int local_close; + int local_beginscan; + int local_rescan; + int local_endscan; + int local_getnext; + int local_fetch; + int local_insert; + int local_delete; + int local_replace; + int local_markpos; + int local_restrpos; + int local_BufferGetRelation; + int local_RelationIdGetRelation; + int local_RelationIdGetRelation_Buf; + int local_RelationNameGetRelation; + int local_getreldesc; + int local_heapgettup; + int local_RelationPutHeapTuple; + int local_RelationPutLongHeapTuple; +} HeapAccessStatisticsData; typedef HeapAccessStatisticsData *HeapAccessStatistics; @@ -115,58 +112,58 @@ extern HeapAccessStatistics heap_access_stats; /* in stats.c */ /* heap_create, heap_creatr, and heap_destroy are declared in catalog/heap.h */ /* heapam.c */ -extern void doinsert(Relation relation, HeapTuple tup); +extern void doinsert(Relation relation, HeapTuple tup); extern Relation heap_open(Oid relationId); extern Relation heap_openr(char *relationName); -extern void heap_close(Relation relation); -extern HeapScanDesc +extern void heap_close(Relation relation); +extern HeapScanDesc heap_beginscan(Relation relation, int atend, TimeQual timeQual, unsigned nkeys, ScanKey key); -extern void heap_rescan(HeapScanDesc sdesc, bool scanFromEnd, ScanKey key); -extern void heap_endscan(HeapScanDesc sdesc); +extern void heap_rescan(HeapScanDesc sdesc, bool scanFromEnd, ScanKey key); +extern void heap_endscan(HeapScanDesc sdesc); extern HeapTuple heap_getnext(HeapScanDesc scandesc, int backw, Buffer * b); -extern HeapTuple +extern HeapTuple heap_fetch(Relation relation, TimeQual timeQual, ItemPointer tid, Buffer * b); -extern Oid heap_insert(Relation relation, HeapTuple tup); -extern int heap_delete(Relation relation, ItemPointer tid); +extern Oid heap_insert(Relation relation, HeapTuple tup); +extern int heap_delete(Relation relation, ItemPointer tid); extern int heap_replace(Relation relation, ItemPointer otid, HeapTuple tup); -extern void heap_markpos(HeapScanDesc sdesc); -extern void heap_restrpos(HeapScanDesc sdesc); +extern void heap_markpos(HeapScanDesc sdesc); +extern void heap_restrpos(HeapScanDesc sdesc); /* in common/heaptuple.c */ -extern Size ComputeDataSize(TupleDesc tupleDesc, Datum value[], char nulls[]); +extern Size ComputeDataSize(TupleDesc tupleDesc, Datum value[], char nulls[]); extern void DataFill(char *data, TupleDesc tupleDesc, Datum value[], char nulls[], char *infomask, bits8 * bit); -extern int heap_attisnull(HeapTuple tup, int attnum); -extern int heap_sysattrlen(AttrNumber attno); -extern bool heap_sysattrbyval(AttrNumber attno); -extern char *heap_getsysattr(HeapTuple tup, Buffer b, int attnum); -extern char * +extern int heap_attisnull(HeapTuple tup, int attnum); +extern int heap_sysattrlen(AttrNumber attno); +extern bool heap_sysattrbyval(AttrNumber attno); +extern char *heap_getsysattr(HeapTuple tup, Buffer b, int attnum); +extern char * fastgetattr(HeapTuple tup, int attnum, TupleDesc att, bool * isnull); extern HeapTuple heap_copytuple(HeapTuple tuple); -extern HeapTuple +extern HeapTuple heap_formtuple(TupleDesc tupleDescriptor, Datum value[], char nulls[]); -extern HeapTuple +extern HeapTuple heap_modifytuple(HeapTuple tuple, Buffer buffer, Relation relation, Datum replValue[], char replNull[], char repl[]); -HeapTuple heap_addheader(uint32 natts, int structlen, char *structure); +HeapTuple heap_addheader(uint32 natts, int structlen, char *structure); /* in common/heap/stats.c */ -extern void PrintHeapAccessStatistics(HeapAccessStatistics stats); -extern void initam(void); +extern void PrintHeapAccessStatistics(HeapAccessStatistics stats); +extern void initam(void); /* hio.c */ extern void RelationPutHeapTuple(Relation relation, BlockNumber blockIndex, HeapTuple tuple); -extern void RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple); +extern void RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple); #endif /* HEAPAM_H */ |