mirror of
https://github.com/postgres/postgres.git
synced 2025-10-22 14:32:25 +03:00
All external function definitions now have prototypes that are checked.
This commit is contained in:
@@ -12,6 +12,10 @@
|
||||
#ifndef GIST_H
|
||||
#define GIST_H
|
||||
|
||||
#include <access/funcindex.h>
|
||||
#include <access/itup.h>
|
||||
#include <access/relscan.h>
|
||||
#include <access/sdir.h>
|
||||
#include <storage/page.h>
|
||||
#include <storage/block.h>
|
||||
#include <utils/rel.h>
|
||||
@@ -142,6 +146,38 @@ typedef struct GISTENTRY {
|
||||
{(e).pred = pr; (e).rel = r; (e).page = pg; (e).offset = o; (e).bytes = b; (e).leafkey = l;}
|
||||
|
||||
/* defined in gist.c */
|
||||
#define TRLOWER(tr) (((tr)->bytes))
|
||||
#define TRUPPER(tr) (&((tr)->bytes[MAXALIGN(VARSIZE(TRLOWER(tr)))]))
|
||||
|
||||
typedef struct txtrange {
|
||||
/* flag: NINF means that lower is negative infinity; PINF means that
|
||||
** upper is positive infinity. 0 means that both are numbers.
|
||||
*/
|
||||
int32 vl_len;
|
||||
int32 flag;
|
||||
char bytes[2];
|
||||
} TXTRANGE;
|
||||
|
||||
typedef struct intrange {
|
||||
int lower;
|
||||
int upper;
|
||||
/* flag: NINF means that lower is negative infinity; PINF means that
|
||||
** upper is positive infinity. 0 means that both are numbers.
|
||||
*/
|
||||
int flag;
|
||||
} INTRANGE;
|
||||
|
||||
extern void gistbuild(Relation heap,
|
||||
Relation index, int natts,
|
||||
AttrNumber *attnum, IndexStrategy istrat,
|
||||
uint16 pint, Datum *params,
|
||||
FuncIndexInfo *finfo,
|
||||
PredInfo *predInfo);
|
||||
extern InsertIndexResult gistinsert(Relation r, Datum *datum,
|
||||
char *nulls,ItemPointer ht_ctid);
|
||||
extern void _gistdump(Relation r);
|
||||
extern char *text_range_out(TXTRANGE *r);
|
||||
extern char *int_range_out(INTRANGE *r);
|
||||
extern void gistfreestack(GISTSTACK *s);
|
||||
extern void initGISTstate(GISTSTATE *giststate, Relation index);
|
||||
extern void gistdentryinit(GISTSTATE *giststate, GISTENTRY *e, char *pr,
|
||||
@@ -149,4 +185,15 @@ extern void gistdentryinit(GISTSTATE *giststate, GISTENTRY *e, char *pr,
|
||||
extern void gistcentryinit(GISTSTATE *giststate, GISTENTRY *e, char *pr,
|
||||
Relation r, Page pg, OffsetNumber o, int b, bool l) ;
|
||||
extern StrategyNumber RelationGetGISTStrategy(Relation, AttrNumber, RegProcedure);
|
||||
|
||||
/* gistget.c */
|
||||
extern RetrieveIndexResult gistgettuple(IndexScanDesc s, ScanDirection dir);
|
||||
extern bool gistindex_keytest(IndexTuple tuple, TupleDesc tupdesc,
|
||||
int scanKeySize, ScanKey key, GISTSTATE *giststate,
|
||||
Relation r, Page p, OffsetNumber offset);
|
||||
|
||||
/* giststrat.c */
|
||||
extern bool RelationInvokeGISTStrategy(Relation r, AttrNumber attnum,
|
||||
StrategyNumber s, Datum left, Datum right);
|
||||
|
||||
#endif /* GIST_H */
|
||||
|
@@ -11,10 +11,17 @@
|
||||
*/
|
||||
#ifndef GISTSCAN_H
|
||||
|
||||
#include <access/relscan.h>
|
||||
#include <storage/off.h>
|
||||
#include <storage/block.h>
|
||||
#include <utils/rel.h>
|
||||
|
||||
void gistadjscans(Relation r, int op, BlockNumber blkno, OffsetNumber offnum);
|
||||
extern IndexScanDesc gistbeginscan(Relation r, bool fromEnd,
|
||||
uint16 nkeys, ScanKey key);
|
||||
extern void gistrescan(IndexScanDesc s, bool fromEnd, ScanKey key);
|
||||
extern void gistmarkpos(IndexScanDesc s);
|
||||
extern void gistrestrpos(IndexScanDesc s);
|
||||
extern void gistendscan(IndexScanDesc s);
|
||||
extern void gistadjscans(Relation r, int op, BlockNumber blkno, OffsetNumber offnum);
|
||||
|
||||
#endif /* GISTSCAN_H */
|
||||
|
@@ -15,11 +15,9 @@
|
||||
#include <access/strat.h>
|
||||
#include <utils/rel.h>
|
||||
|
||||
StrategyNumber
|
||||
RelationGetGISTStrategy(Relation r, AttrNumber attnum, RegProcedure proc);
|
||||
|
||||
bool
|
||||
RelationInvokeGISTStrategy(Relation r, AttrNumber attnum, StrategyNumber s,
|
||||
Datum left, Datum right);
|
||||
extern StrategyNumber RelationGetGISTStrategy(Relation r,
|
||||
AttrNumber attnum, RegProcedure proc);
|
||||
extern bool RelationInvokeGISTStrategy(Relation r, AttrNumber attnum,
|
||||
StrategyNumber s, Datum left, Datum right);
|
||||
|
||||
#endif /* GISTSTRAT_H */
|
||||
|
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: hash.h,v 1.3 1996/11/05 10:37:02 scrappy Exp $
|
||||
* $Id: hash.h,v 1.4 1996/11/10 03:04:36 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* modeled after Margo Seltzer's hash implementation for unix.
|
||||
@@ -277,6 +277,7 @@ extern uint32 hashchar4(uint32 intkey);
|
||||
extern uint32 hashchar8(char *key);
|
||||
extern uint32 hashchar16(char *key);
|
||||
extern uint32 hashtext(struct varlena *key);
|
||||
extern uint32 hashname(NameData *n);
|
||||
|
||||
/* private routines */
|
||||
|
||||
|
@@ -6,14 +6,17 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: heapam.h,v 1.5 1996/11/05 07:22:50 scrappy Exp $
|
||||
* $Id: heapam.h,v 1.6 1996/11/10 03:04:37 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#ifndef HEAPAM_H
|
||||
#define HEAPAM_H
|
||||
|
||||
#include <access/htup.h>
|
||||
#include <access/relscan.h>
|
||||
#include <storage/block.h>
|
||||
#include <utils/rel.h>
|
||||
|
||||
/* ----------------------------------------------------------------
|
||||
* heap access method statistics
|
||||
@@ -134,4 +137,9 @@ extern void PrintHeapAccessStatistics(HeapAccessStatistics stats);
|
||||
extern void PrintAndFreeHeapAccessStatistics(HeapAccessStatistics stats);
|
||||
extern void initam(void);
|
||||
|
||||
/* hio.c */
|
||||
extern void RelationPutHeapTuple(Relation relation, BlockNumber blockIndex,
|
||||
HeapTuple tuple);
|
||||
extern void RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple);
|
||||
|
||||
#endif /* HEAPAM_H */
|
||||
|
@@ -6,14 +6,19 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: rtree.h,v 1.2 1996/11/05 08:18:14 scrappy Exp $
|
||||
* $Id: rtree.h,v 1.3 1996/11/10 03:04:39 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#ifndef RTREE_H
|
||||
#define RTREE_H
|
||||
|
||||
#include <access/funcindex.h>
|
||||
#include <access/itup.h>
|
||||
#include <access/relscan.h>
|
||||
#include <access/sdir.h>
|
||||
#include <access/skey.h>
|
||||
#include <access/strat.h>
|
||||
#include <storage/block.h>
|
||||
#include <storage/off.h>
|
||||
|
||||
@@ -99,4 +104,39 @@ typedef RTreeScanOpaqueData *RTreeScanOpaque;
|
||||
/* defined in rtree.c */
|
||||
extern void freestack(RTSTACK *s);
|
||||
|
||||
/* rget.c */
|
||||
extern RetrieveIndexResult rtgettuple(IndexScanDesc s, ScanDirection dir);
|
||||
|
||||
/*
|
||||
* RTree code.
|
||||
* Defined in access/index-rtree/
|
||||
*/
|
||||
extern InsertIndexResult rtinsert(Relation r, Datum *datum, char *nulls,
|
||||
ItemPointer ht_ctid);
|
||||
extern char *rtdelete(Relation r, ItemPointer tid);
|
||||
|
||||
extern RetrieveIndexResult rtgettuple(IndexScanDesc s, ScanDirection dir);
|
||||
extern IndexScanDesc rtbeginscan(Relation r, bool fromEnd, uint16 nkeys,
|
||||
ScanKey key);
|
||||
|
||||
extern void rtendscan(IndexScanDesc s);
|
||||
extern void rtmarkpos(IndexScanDesc s);
|
||||
extern void rtrestrpos(IndexScanDesc s);
|
||||
extern void rtrescan(IndexScanDesc s, bool fromEnd, ScanKey key);
|
||||
extern void rtbuild(Relation heap, Relation index, int natts,
|
||||
AttrNumber *attnum, IndexStrategy istrat, uint16 pcount,
|
||||
Datum *params, FuncIndexInfo *finfo, PredInfo *predInfo);
|
||||
extern void _rtdump(Relation r);
|
||||
|
||||
/* rtscan.c */
|
||||
extern void rtadjscans(Relation r, int op, BlockNumber blkno,
|
||||
OffsetNumber offnum);
|
||||
/* rtstrat.h */
|
||||
extern StrategyNumber RelationGetRTStrategy(Relation r,
|
||||
AttrNumber attnum, RegProcedure proc);
|
||||
extern bool RelationInvokeRTStrategy(Relation r, AttrNumber attnum,
|
||||
StrategyNumber s, Datum left, Datum right);
|
||||
extern RegProcedure RTMapOperator(Relation r, AttrNumber attnum,
|
||||
RegProcedure proc);
|
||||
|
||||
#endif /* RTREE_H */
|
||||
|
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: transam.h,v 1.4 1996/11/05 07:07:22 scrappy Exp $
|
||||
* $Id: transam.h,v 1.5 1996/11/10 03:04:41 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* Transaction System Version 101 now support proper oid
|
||||
@@ -140,14 +140,14 @@ typedef VariableRelationContentsData *VariableRelationContents;
|
||||
/*
|
||||
* prototypes for functions in transam/transam.c
|
||||
*/
|
||||
extern int RecoveryCheckingEnabled();
|
||||
extern int RecoveryCheckingEnabled(void);
|
||||
extern void SetRecoveryCheckingEnabled(bool state);
|
||||
extern bool TransactionLogTest(TransactionId transactionId, XidStatus status);
|
||||
extern void TransactionLogUpdate(TransactionId transactionId,
|
||||
XidStatus status);
|
||||
extern AbsoluteTime TransactionIdGetCommitTime(TransactionId transactionId);
|
||||
extern void TransRecover(Relation logRelation);
|
||||
extern void InitializeTransactionLog();
|
||||
extern void InitializeTransactionLog(void);
|
||||
extern bool TransactionIdDidCommit(TransactionId transactionId);
|
||||
extern bool TransactionIdDidAbort(TransactionId transactionId);
|
||||
extern bool TransactionIdIsInProgress(TransactionId transactionId);
|
||||
|
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: xact.h,v 1.3 1996/11/05 07:15:58 scrappy Exp $
|
||||
* $Id: xact.h,v 1.4 1996/11/10 03:04:42 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -55,7 +55,7 @@ typedef TransactionStateData *TransactionState;
|
||||
* extern definitions
|
||||
* ----------------
|
||||
*/
|
||||
extern int TransactionFlushEnabled();
|
||||
extern int TransactionFlushEnabled(void);
|
||||
extern void SetTransactionFlushEnabled(bool state);
|
||||
|
||||
extern bool IsTransactionState(void);
|
||||
@@ -90,12 +90,15 @@ extern void AbortCurrentTransaction(void);
|
||||
extern void BeginTransactionBlock(void);
|
||||
extern void EndTransactionBlock(void);
|
||||
extern void AbortTransactionBlock(void);
|
||||
extern bool IsTransactionBlock();
|
||||
extern void UserAbortTransactionBlock();
|
||||
extern bool IsTransactionBlock(void);
|
||||
extern void UserAbortTransactionBlock(void);
|
||||
|
||||
extern TransactionId DisabledTransactionId;
|
||||
|
||||
/* defined in xid.c */
|
||||
extern TransactionId xidin(char *representation);
|
||||
extern char *xidout(TransactionId transactionId);
|
||||
extern bool xideq(TransactionId xid1, TransactionId xid2);
|
||||
extern bool TransactionIdIsValid(TransactionId transactionId);
|
||||
extern void StoreInvalidTransactionId(TransactionId *destination);
|
||||
extern void TransactionIdStore(TransactionId transactionId,
|
||||
|
Reference in New Issue
Block a user