diff options
Diffstat (limited to 'src/include/access')
-rw-r--r-- | src/include/access/clog.h | 6 | ||||
-rw-r--r-- | src/include/access/genam.h | 14 | ||||
-rw-r--r-- | src/include/access/gin.h | 123 | ||||
-rw-r--r-- | src/include/access/gist_private.h | 18 | ||||
-rw-r--r-- | src/include/access/hash.h | 4 | ||||
-rw-r--r-- | src/include/access/heapam.h | 4 | ||||
-rw-r--r-- | src/include/access/hio.h | 6 | ||||
-rw-r--r-- | src/include/access/htup.h | 13 | ||||
-rw-r--r-- | src/include/access/nbtree.h | 8 | ||||
-rw-r--r-- | src/include/access/reloptions.h | 91 | ||||
-rw-r--r-- | src/include/access/visibilitymap.h | 8 | ||||
-rw-r--r-- | src/include/access/xact.h | 6 | ||||
-rw-r--r-- | src/include/access/xlogutils.h | 6 |
13 files changed, 155 insertions, 152 deletions
diff --git a/src/include/access/clog.h b/src/include/access/clog.h index 8620de8f9f..1324df30eb 100644 --- a/src/include/access/clog.h +++ b/src/include/access/clog.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/clog.h,v 1.23 2009/01/01 17:23:55 momjian Exp $ + * $PostgreSQL: pgsql/src/include/access/clog.h,v 1.24 2009/06/11 14:49:08 momjian Exp $ */ #ifndef CLOG_H #define CLOG_H @@ -32,8 +32,8 @@ typedef int XidStatus; #define NUM_CLOG_BUFFERS 8 -extern void TransactionIdSetTreeStatus(TransactionId xid, int nsubxids, - TransactionId *subxids, XidStatus status, XLogRecPtr lsn); +extern void TransactionIdSetTreeStatus(TransactionId xid, int nsubxids, + TransactionId *subxids, XidStatus status, XLogRecPtr lsn); extern XidStatus TransactionIdGetStatus(TransactionId xid, XLogRecPtr *lsn); extern Size CLOGShmemSize(void); diff --git a/src/include/access/genam.h b/src/include/access/genam.h index 868980e326..bf3fe96e26 100644 --- a/src/include/access/genam.h +++ b/src/include/access/genam.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/genam.h,v 1.77 2009/06/06 22:13:52 tgl Exp $ + * $PostgreSQL: pgsql/src/include/access/genam.h,v 1.78 2009/06/11 14:49:08 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -110,8 +110,8 @@ extern IndexScanDesc index_beginscan(Relation heapRelation, Snapshot snapshot, int nkeys, ScanKey key); extern IndexScanDesc index_beginscan_bitmap(Relation indexRelation, - Snapshot snapshot, - int nkeys, ScanKey key); + Snapshot snapshot, + int nkeys, ScanKey key); extern void index_rescan(IndexScanDesc scan, ScanKey key); extern void index_endscan(IndexScanDesc scan); extern void index_markpos(IndexScanDesc scan); @@ -149,11 +149,11 @@ extern HeapTuple systable_getnext(SysScanDesc sysscan); extern bool systable_recheck_tuple(SysScanDesc sysscan, HeapTuple tup); extern void systable_endscan(SysScanDesc sysscan); extern SysScanDesc systable_beginscan_ordered(Relation heapRelation, - Relation indexRelation, - Snapshot snapshot, - int nkeys, ScanKey key); + Relation indexRelation, + Snapshot snapshot, + int nkeys, ScanKey key); extern HeapTuple systable_getnext_ordered(SysScanDesc sysscan, - ScanDirection direction); + ScanDirection direction); extern void systable_endscan_ordered(SysScanDesc sysscan); #endif /* GENAM_H */ diff --git a/src/include/access/gin.h b/src/include/access/gin.h index 366fc370b0..3f814eed73 100644 --- a/src/include/access/gin.h +++ b/src/include/access/gin.h @@ -4,7 +4,7 @@ * * Copyright (c) 2006-2009, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/include/access/gin.h,v 1.33 2009/06/06 02:39:40 tgl Exp $ + * $PostgreSQL: pgsql/src/include/access/gin.h,v 1.34 2009/06/11 14:49:08 momjian Exp $ *-------------------------------------------------------------------------- */ #ifndef GIN_H @@ -29,7 +29,7 @@ /* * Max depth allowed in search tree during bulk inserts. This is to keep from * degenerating to O(N^2) behavior when the tree is unbalanced due to sorted - * or nearly-sorted input. (Perhaps it would be better to use a balanced-tree + * or nearly-sorted input. (Perhaps it would be better to use a balanced-tree * algorithm, but in common cases that would only add useless overhead.) */ #define GIN_MAX_TREE_DEPTH 100 @@ -59,7 +59,7 @@ typedef GinPageOpaqueData *GinPageOpaque; #define GIN_DELETED (1 << 2) #define GIN_META (1 << 3) #define GIN_LIST (1 << 4) -#define GIN_LIST_FULLROW (1 << 5) /* makes sense only on GIN_LIST page */ +#define GIN_LIST_FULLROW (1 << 5) /* makes sense only on GIN_LIST page */ /* Page numbers of fixed-location pages */ #define GIN_METAPAGE_BLKNO (0) @@ -72,20 +72,20 @@ typedef struct GinMetaPageData * pages. These store fast-inserted entries that haven't yet been moved * into the regular GIN structure. */ - BlockNumber head; - BlockNumber tail; + BlockNumber head; + BlockNumber tail; /* * Free space in bytes in the pending list's tail page. */ - uint32 tailFreeSize; + uint32 tailFreeSize; /* - * We store both number of pages and number of heap tuples - * that are in the pending list. + * We store both number of pages and number of heap tuples that are in the + * pending list. */ - BlockNumber nPendingPages; - int64 nPendingHeapTuples; + BlockNumber nPendingPages; + int64 nPendingHeapTuples; } GinMetaPageData; #define GinPageGetMeta(p) \ @@ -175,7 +175,7 @@ typedef struct #define GinDataPageGetRightBound(page) ((ItemPointer) PageGetContents(page)) #define GinDataPageGetData(page) \ (PageGetContents(page) + MAXALIGN(sizeof(ItemPointerData))) -#define GinSizeOfItem(page) \ +#define GinSizeOfItem(page) \ (GinPageIsLeaf(page) ? sizeof(ItemPointerData) : sizeof(PostingItem)) #define GinDataPageGetItem(page,i) \ (GinDataPageGetData(page) + ((i)-1) * GinSizeOfItem(page)) @@ -190,18 +190,18 @@ typedef struct * List pages */ #define GinListPageSize \ - ( BLCKSZ - SizeOfPageHeaderData - MAXALIGN(sizeof(GinPageOpaqueData)) ) + ( BLCKSZ - SizeOfPageHeaderData - MAXALIGN(sizeof(GinPageOpaqueData)) ) /* * Storage type for GIN's reloptions */ typedef struct GinOptions { - int32 vl_len_; /* varlena header (do not touch directly!) */ + int32 vl_len_; /* varlena header (do not touch directly!) */ bool useFastUpdate; /* use fast updates? */ } GinOptions; -#define GIN_DEFAULT_USE_FASTUPDATE true +#define GIN_DEFAULT_USE_FASTUPDATE true #define GinGetUseFastUpdate(relation) \ ((relation)->rd_options ? \ ((GinOptions *) (relation)->rd_options)->useFastUpdate : GIN_DEFAULT_USE_FASTUPDATE) @@ -217,14 +217,15 @@ typedef struct GinState FmgrInfo extractValueFn[INDEX_MAX_KEYS]; FmgrInfo extractQueryFn[INDEX_MAX_KEYS]; FmgrInfo consistentFn[INDEX_MAX_KEYS]; - FmgrInfo comparePartialFn[INDEX_MAX_KEYS]; /* optional method */ + FmgrInfo comparePartialFn[INDEX_MAX_KEYS]; /* optional method */ - bool canPartialMatch[INDEX_MAX_KEYS]; /* can opclass perform partial - * match (prefix search)? */ + bool canPartialMatch[INDEX_MAX_KEYS]; /* can opclass perform + * partial match (prefix + * search)? */ - TupleDesc tupdesc[INDEX_MAX_KEYS]; - TupleDesc origTupdesc; - bool oneCol; + TupleDesc tupdesc[INDEX_MAX_KEYS]; + TupleDesc origTupdesc; + bool oneCol; } GinState; /* XLog stuff */ @@ -309,13 +310,13 @@ typedef struct ginxlogDeletePage typedef struct ginxlogUpdateMeta { - RelFileNode node; + RelFileNode node; GinMetaPageData metadata; - BlockNumber prevTail; - BlockNumber newRightlink; - int32 ntuples; /* if ntuples > 0 then metadata.tail was updated - * with that many tuples; else new sub list was - * inserted */ + BlockNumber prevTail; + BlockNumber newRightlink; + int32 ntuples; /* if ntuples > 0 then metadata.tail was + * updated with that many tuples; else new sub + * list was inserted */ /* array of inserted tuples follows */ } ginxlogUpdateMeta; @@ -323,10 +324,10 @@ typedef struct ginxlogUpdateMeta typedef struct ginxlogInsertListPage { - RelFileNode node; - BlockNumber blkno; - BlockNumber rightlink; - int32 ntuples; + RelFileNode node; + BlockNumber blkno; + BlockNumber rightlink; + int32 ntuples; /* array of inserted tuples follows */ } ginxlogInsertListPage; @@ -335,10 +336,10 @@ typedef struct ginxlogInsertListPage #define GIN_NDELETE_AT_ONCE 16 typedef struct ginxlogDeleteListPages { - RelFileNode node; + RelFileNode node; GinMetaPageData metadata; - int32 ndeleted; - BlockNumber toDelete[GIN_NDELETE_AT_ONCE]; + int32 ndeleted; + BlockNumber toDelete[GIN_NDELETE_AT_ONCE]; } ginxlogDeleteListPages; @@ -350,8 +351,8 @@ extern void GinInitBuffer(Buffer b, uint32 f); extern void GinInitPage(Page page, uint32 f, Size pageSize); extern void GinInitMetabuffer(Buffer b); extern int compareEntries(GinState *ginstate, OffsetNumber attnum, Datum a, Datum b); -extern int compareAttEntries(GinState *ginstate, OffsetNumber attnum_a, Datum a, - OffsetNumber attnum_b, Datum b); +extern int compareAttEntries(GinState *ginstate, OffsetNumber attnum_a, Datum a, + OffsetNumber attnum_b, Datum b); extern Datum *extractEntriesS(GinState *ginstate, OffsetNumber attnum, Datum value, int32 *nentries, bool *needUnique); extern Datum *extractEntriesSU(GinState *ginstate, OffsetNumber attnum, Datum value, int32 *nentries); @@ -363,9 +364,9 @@ extern OffsetNumber gintuple_get_attrnum(GinState *ginstate, IndexTuple tuple); extern Datum ginbuild(PG_FUNCTION_ARGS); extern Datum gininsert(PG_FUNCTION_ARGS); extern void ginEntryInsert(Relation index, GinState *ginstate, - OffsetNumber attnum, Datum value, - ItemPointerData *items, uint32 nitem, - bool isBuild); + OffsetNumber attnum, Datum value, + ItemPointerData *items, uint32 nitem, + bool isBuild); /* ginxlog.c */ extern void gin_redo(XLogRecPtr lsn, XLogRecord *record); @@ -413,7 +414,7 @@ typedef struct GinBtreeData BlockNumber rightblkno; /* Entry options */ - OffsetNumber entryAttnum; + OffsetNumber entryAttnum; Datum entryValue; IndexTuple entry; bool isDelete; @@ -434,10 +435,10 @@ extern void findParents(GinBtree btree, GinBtreeStack *stack, BlockNumber rootBl /* ginentrypage.c */ extern IndexTuple GinFormTuple(GinState *ginstate, OffsetNumber attnum, Datum key, - ItemPointerData *ipd, uint32 nipd); + ItemPointerData *ipd, uint32 nipd); extern void GinShortenTuple(IndexTuple itup, uint32 nipd); extern void prepareEntryScan(GinBtree btree, Relation index, OffsetNumber attnum, - Datum value, GinState *ginstate); + Datum value, GinState *ginstate); extern void entryFillRoot(GinBtree btree, Buffer root, Buffer lbuf, Buffer rbuf); extern IndexTuple ginPageGetLinkItup(Buffer buf); @@ -481,8 +482,8 @@ typedef struct GinScanEntryData /* entry, got from extractQueryFn */ Datum entry; - OffsetNumber attnum; - Pointer extra_data; + OffsetNumber attnum; + Pointer extra_data; /* Current page in posting tree */ Buffer buffer; @@ -499,8 +500,8 @@ typedef struct GinScanEntryData /* used for Posting list and one page in Posting tree */ ItemPointerData *list; - uint32 nlist; - OffsetNumber offset; + uint32 nlist; + OffsetNumber offset; bool isFinished; bool reduceResult; @@ -517,12 +518,12 @@ typedef struct GinScanKeyData /* array of scans per entry */ GinScanEntry scanEntry; - Pointer *extra_data; + Pointer *extra_data; /* for calling consistentFn(GinScanKey->entryRes, strategy, query) */ StrategyNumber strategy; Datum query; - OffsetNumber attnum; + OffsetNumber attnum; ItemPointerData curItem; bool firstCall; @@ -568,12 +569,12 @@ extern Datum ginarrayconsistent(PG_FUNCTION_ARGS); /* ginbulk.c */ typedef struct EntryAccumulator { - OffsetNumber attnum; - Datum value; - uint32 length; - uint32 number; + OffsetNumber attnum; + Datum value; + uint32 length; + uint32 number; ItemPointerData *list; - bool shouldSort; + bool shouldSort; struct EntryAccumulator *left; struct EntryAccumulator *right; } EntryAccumulator; @@ -601,18 +602,18 @@ extern ItemPointerData *ginGetEntry(BuildAccumulator *accum, OffsetNumber *attnu typedef struct GinTupleCollector { - IndexTuple *tuples; - uint32 ntuples; - uint32 lentuples; - uint32 sumsize; + IndexTuple *tuples; + uint32 ntuples; + uint32 lentuples; + uint32 sumsize; } GinTupleCollector; extern void ginHeapTupleFastInsert(Relation index, GinState *ginstate, - GinTupleCollector *collector); + GinTupleCollector *collector); extern uint32 ginHeapTupleFastCollect(Relation index, GinState *ginstate, - GinTupleCollector *collector, - OffsetNumber attnum, Datum value, ItemPointer item); + GinTupleCollector *collector, + OffsetNumber attnum, Datum value, ItemPointer item); extern void ginInsertCleanup(Relation index, GinState *ginstate, - bool vac_delay, IndexBulkDeleteResult *stats); + bool vac_delay, IndexBulkDeleteResult *stats); -#endif /* GIN_H */ +#endif /* GIN_H */ diff --git a/src/include/access/gist_private.h b/src/include/access/gist_private.h index 3229c32d5a..2ce46542af 100644 --- a/src/include/access/gist_private.h +++ b/src/include/access/gist_private.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/gist_private.h,v 1.36 2009/01/01 17:23:55 momjian Exp $ + * $PostgreSQL: pgsql/src/include/access/gist_private.h,v 1.37 2009/06/11 14:49:08 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -60,9 +60,9 @@ typedef struct GISTSTATE typedef struct ItemResult { - ItemPointerData heapPtr; - OffsetNumber pageOffset; /* offset in index page */ - bool recheck; + ItemPointerData heapPtr; + OffsetNumber pageOffset; /* offset in index page */ + bool recheck; } ItemResult; /* @@ -73,15 +73,15 @@ typedef struct GISTScanOpaqueData { GISTSearchStack *stack; GISTSearchStack *markstk; - bool qual_ok; /* false if qual can never be satisfied */ + bool qual_ok; /* false if qual can never be satisfied */ GISTSTATE *giststate; MemoryContext tempCxt; Buffer curbuf; ItemPointerData curpos; - ItemResult pageData[BLCKSZ/sizeof(IndexTupleData)]; - OffsetNumber nPageData; - OffsetNumber curPageData; + ItemResult pageData[BLCKSZ / sizeof(IndexTupleData)]; + OffsetNumber nPageData; + OffsetNumber curPageData; } GISTScanOpaqueData; typedef GISTScanOpaqueData *GISTScanOpaque; @@ -283,7 +283,7 @@ extern bool gistnospace(Page page, IndexTuple *itvec, int len, OffsetNumber tode extern void gistcheckpage(Relation rel, Buffer buf); extern Buffer gistNewBuffer(Relation r); extern void gistfillbuffer(Page page, IndexTuple *itup, int len, - OffsetNumber off); + OffsetNumber off); extern IndexTuple *gistextractpage(Page page, int *len /* out */ ); extern IndexTuple *gistjoinvector( IndexTuple *itvec, int *len, diff --git a/src/include/access/hash.h b/src/include/access/hash.h index 0247ece338..a70ace032f 100644 --- a/src/include/access/hash.h +++ b/src/include/access/hash.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/hash.h,v 1.92 2009/01/01 17:23:55 momjian Exp $ + * $PostgreSQL: pgsql/src/include/access/hash.h,v 1.93 2009/06/11 14:49:08 momjian Exp $ * * NOTES * modeled after Margo Seltzer's hash implementation for unix. @@ -340,7 +340,7 @@ extern uint32 _hash_log2(uint32 num); extern void _hash_checkpage(Relation rel, Buffer buf, int flags); extern uint32 _hash_get_indextuple_hashkey(IndexTuple itup); extern IndexTuple _hash_form_tuple(Relation index, - Datum *values, bool *isnull); + Datum *values, bool *isnull); extern OffsetNumber _hash_binsearch(Page page, uint32 hash_value); extern OffsetNumber _hash_binsearch_last(Page page, uint32 hash_value); diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h index ec49192cac..459b780824 100644 --- a/src/include/access/heapam.h +++ b/src/include/access/heapam.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/heapam.h,v 1.142 2009/05/12 16:43:32 tgl Exp $ + * $PostgreSQL: pgsql/src/include/access/heapam.h,v 1.143 2009/06/11 14:49:08 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -138,7 +138,7 @@ extern XLogRecPtr log_heap_freeze(Relation reln, Buffer buffer, TransactionId cutoff_xid, OffsetNumber *offsets, int offcnt); extern XLogRecPtr log_newpage(RelFileNode *rnode, ForkNumber forkNum, - BlockNumber blk, Page page); + BlockNumber blk, Page page); /* in heap/pruneheap.c */ extern void heap_page_prune_opt(Relation relation, Buffer buffer, diff --git a/src/include/access/hio.h b/src/include/access/hio.h index 798e12f4fd..54b76084ac 100644 --- a/src/include/access/hio.h +++ b/src/include/access/hio.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/hio.h,v 1.38 2009/01/01 17:23:56 momjian Exp $ + * $PostgreSQL: pgsql/src/include/access/hio.h,v 1.39 2009/06/11 14:49:08 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -29,8 +29,8 @@ */ typedef struct BulkInsertStateData { - BufferAccessStrategy strategy; /* our BULKWRITE strategy object */ - Buffer current_buf; /* current insertion target page */ + BufferAccessStrategy strategy; /* our BULKWRITE strategy object */ + Buffer current_buf; /* current insertion target page */ } BulkInsertStateData; diff --git a/src/include/access/htup.h b/src/include/access/htup.h index 5907436691..f7fa60cb70 100644 --- a/src/include/access/htup.h +++ b/src/include/access/htup.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/htup.h,v 1.106 2009/01/01 17:23:56 momjian Exp $ + * $PostgreSQL: pgsql/src/include/access/htup.h,v 1.107 2009/06/11 14:49:08 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -422,7 +422,7 @@ do { \ * the MINIMAL_TUPLE_OFFSET distance. t_len does not include that, however. * * MINIMAL_TUPLE_DATA_OFFSET is the offset to the first useful (non-pad) data - * other than the length word. tuplesort.c and tuplestore.c use this to avoid + * other than the length word. tuplesort.c and tuplestore.c use this to avoid * writing the padding to disk. */ #define MINIMAL_TUPLE_OFFSET \ @@ -601,7 +601,7 @@ typedef struct xl_heaptid typedef struct xl_heap_delete { xl_heaptid target; /* deleted tuple id */ - bool all_visible_cleared; /* PD_ALL_VISIBLE was cleared */ + bool all_visible_cleared; /* PD_ALL_VISIBLE was cleared */ } xl_heap_delete; #define SizeOfHeapDelete (offsetof(xl_heap_delete, all_visible_cleared) + sizeof(bool)) @@ -627,7 +627,7 @@ typedef struct xl_heap_header typedef struct xl_heap_insert { xl_heaptid target; /* inserted tuple id */ - bool all_visible_cleared; /* PD_ALL_VISIBLE was cleared */ + bool all_visible_cleared; /* PD_ALL_VISIBLE was cleared */ /* xl_heap_header & TUPLE DATA FOLLOWS AT END OF STRUCT */ } xl_heap_insert; @@ -638,8 +638,8 @@ typedef struct xl_heap_update { xl_heaptid target; /* deleted tuple id */ ItemPointerData newtid; /* new inserted tuple id */ - bool all_visible_cleared; /* PD_ALL_VISIBLE was cleared */ - bool new_all_visible_cleared; /* same for the page of newtid */ + bool all_visible_cleared; /* PD_ALL_VISIBLE was cleared */ + bool new_all_visible_cleared; /* same for the page of newtid */ /* NEW TUPLE xl_heap_header (PLUS xmax & xmin IF MOVE OP) */ /* and TUPLE DATA FOLLOWS AT END OF STRUCT */ } xl_heap_update; @@ -834,6 +834,7 @@ extern HeapTuple heap_modify_tuple(HeapTuple tuple, bool *doReplace); extern void heap_deform_tuple(HeapTuple tuple, TupleDesc tupleDesc, Datum *values, bool *isnull); + /* these three are deprecated versions of the three above: */ extern HeapTuple heap_formtuple(TupleDesc tupleDescriptor, Datum *values, char *nulls); diff --git a/src/include/access/nbtree.h b/src/include/access/nbtree.h index 071f8f4ab6..1d3e42d99b 100644 --- a/src/include/access/nbtree.h +++ b/src/include/access/nbtree.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/nbtree.h,v 1.123 2009/01/01 17:23:56 momjian Exp $ + * $PostgreSQL: pgsql/src/include/access/nbtree.h,v 1.124 2009/06/11 14:49:08 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -287,9 +287,9 @@ typedef struct xl_btree_split * than BlockNumber for alignment reasons: SizeOfBtreeSplit is only 16-bit * aligned.) * - * If level > 0, an IndexTuple representing the HIKEY of the left page - * follows. We don't need this on leaf pages, because it's the same - * as the leftmost key in the new right page. Also, it's suppressed if + * If level > 0, an IndexTuple representing the HIKEY of the left page + * follows. We don't need this on leaf pages, because it's the same as + * the leftmost key in the new right page. Also, it's suppressed if * XLogInsert chooses to store the left page's whole page image. * * In the _L variants, next are OffsetNumber newitemoff and the new item. diff --git a/src/include/access/reloptions.h b/src/include/access/reloptions.h index d078273217..fd4aaf049b 100644 --- a/src/include/access/reloptions.h +++ b/src/include/access/reloptions.h @@ -11,7 +11,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/reloptions.h,v 1.15 2009/05/24 22:22:44 tgl Exp $ + * $PostgreSQL: pgsql/src/include/access/reloptions.h,v 1.16 2009/06/11 14:49:09 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -33,12 +33,12 @@ typedef enum relopt_type /* kinds supported by reloptions */ typedef enum relopt_kind { - RELOPT_KIND_HEAP = (1 << 0), - RELOPT_KIND_TOAST = (1 << 1), - RELOPT_KIND_BTREE = (1 << 2), - RELOPT_KIND_HASH = (1 << 3), - RELOPT_KIND_GIN = (1 << 4), - RELOPT_KIND_GIST = (1 << 5), + RELOPT_KIND_HEAP = (1 << 0), + RELOPT_KIND_TOAST = (1 << 1), + RELOPT_KIND_BTREE = (1 << 2), + RELOPT_KIND_HASH = (1 << 3), + RELOPT_KIND_GIN = (1 << 4), + RELOPT_KIND_GIST = (1 << 5), /* if you add a new kind, make sure you update "last_default" too */ RELOPT_KIND_LAST_DEFAULT = RELOPT_KIND_GIST, /* some compilers treat enums as signed ints, so we can't use 1 << 31 */ @@ -51,11 +51,12 @@ typedef enum relopt_kind /* generic struct to hold shared data */ typedef struct relopt_gen { - const char *name; /* must be first (used as list termination marker) */ + const char *name; /* must be first (used as list termination + * marker) */ const char *desc; bits32 kinds; int namelen; - relopt_type type; + relopt_type type; } relopt_gen; /* holds a parsed value */ @@ -65,11 +66,11 @@ typedef struct relopt_value bool isset; union { - bool bool_val; - int int_val; - double real_val; - char *string_val; /* allocated separately */ - } values; + bool bool_val; + int int_val; + double real_val; + char *string_val; /* allocated separately */ + } values; } relopt_value; /* reloptions records for specific variable types */ @@ -103,15 +104,15 @@ typedef struct relopt_string relopt_gen gen; int default_len; bool default_isnull; - validate_string_relopt validate_cb; - char default_val[1]; /* variable length, zero-terminated */ + validate_string_relopt validate_cb; + char default_val[1]; /* variable length, zero-terminated */ } relopt_string; /* This is the table datatype for fillRelOptions */ typedef struct { const char *optname; /* option's name */ - relopt_type opttype; /* option's datatype */ + relopt_type opttype; /* option's datatype */ int offset; /* offset of field in result struct */ } relopt_parse_elt; @@ -134,24 +135,24 @@ typedef struct * parseRelOptions: * for (i = 0; options[i].gen->name; i++) * { - * if (HAVE_RELOPTION("fillfactor", options[i]) - * { - * HANDLE_INT_RELOPTION("fillfactor", rdopts->fillfactor, options[i], &isset); - * continue; - * } - * if (HAVE_RELOPTION("default_row_acl", options[i]) - * { - * ... - * } - * ... - * if (validate) - * ereport(ERROR, - * (errmsg("unknown option"))); - * } + * if (HAVE_RELOPTION("fillfactor", options[i]) + * { + * HANDLE_INT_RELOPTION("fillfactor", rdopts->fillfactor, options[i], &isset); + * continue; + * } + * if (HAVE_RELOPTION("default_row_acl", options[i]) + * { + * ... + * } + * ... + * if (validate) + * ereport(ERROR, + * (errmsg("unknown option"))); + * } * - * Note that this is more or less the same that fillRelOptions does, so only - * use this if you need to do something non-standard within some option's - * code block. + * Note that this is more or less the same that fillRelOptions does, so only + * use this if you need to do something non-standard within some option's + * code block. */ #define HAVE_RELOPTION(optname, option) \ (pg_strncasecmp(option.gen->name, optname, option.gen->namelen + 1) == 0) @@ -159,25 +160,25 @@ typedef struct #define HANDLE_INT_RELOPTION(optname, var, option, wasset) \ do { \ if (option.isset) \ - var = option.values.int_val; \ + var = option.values.int_val; \ else \ - var = ((relopt_int *) option.gen)->default_val; \ + var = ((relopt_int *) option.gen)->default_val; \ (wasset) != NULL ? *(wasset) = option.isset : (dummyret)NULL; \ } while (0) #define HANDLE_BOOL_RELOPTION(optname, var, option, wasset) \ do { \ if (option.isset) \ - var = option.values.bool_val; \ + var = option.values.bool_val; \ else \ var = ((relopt_bool *) option.gen)->default_val; \ (wasset) != NULL ? *(wasset) = option.isset : (dummyret) NULL; \ } while (0) -#define HANDLE_REAL_RELOPTION(optname, var, option, wasset) \ +#define HANDLE_REAL_RELOPTION(optname, var, option, wasset) \ do { \ if (option.isset) \ - var = option.values.real_val; \ + var = option.values.real_val; \ else \ var = ((relopt_real *) option.gen)->default_val; \ (wasset) != NULL ? *(wasset) = option.isset : (dummyret) NULL; \ @@ -190,11 +191,11 @@ typedef struct * "base" is a pointer to the reloptions structure, and "offset" is an integer * variable that must be initialized to sizeof(reloptions structure). This * struct must have been allocated with enough space to hold any string option - * present, including terminating \0 for every option. SET_VARSIZE() must be + * present, including terminating \0 for every option. SET_VARSIZE() must be * called on the struct with this offset as the second argument, after all the * string options have been processed. */ -#define HANDLE_STRING_RELOPTION(optname, var, option, base, offset, wasset) \ +#define HANDLE_STRING_RELOPTION(optname, var, option, base, offset, wasset) \ do { \ relopt_string *optstring = (relopt_string *) option.gen;\ char *string_val; \ @@ -254,14 +255,14 @@ extern relopt_value *parseRelOptions(Datum options, bool validate, extern void *allocateReloptStruct(Size base, relopt_value *options, int numoptions); extern void fillRelOptions(void *rdopts, Size basesize, - relopt_value *options, int numoptions, - bool validate, - const relopt_parse_elt *elems, int nelems); + relopt_value *options, int numoptions, + bool validate, + const relopt_parse_elt *elems, int nelems); extern bytea *default_reloptions(Datum reloptions, bool validate, relopt_kind kind); extern bytea *heap_reloptions(char relkind, Datum reloptions, bool validate); extern bytea *index_reloptions(RegProcedure amoptions, Datum reloptions, - bool validate); + bool validate); #endif /* RELOPTIONS_H */ diff --git a/src/include/access/visibilitymap.h b/src/include/access/visibilitymap.h index 9e40acbbe9..3f4b3abb3c 100644 --- a/src/include/access/visibilitymap.h +++ b/src/include/access/visibilitymap.h @@ -1,13 +1,13 @@ /*------------------------------------------------------------------------- * * visibilitymap.h - * visibility map interface + * visibility map interface * * * Portions Copyright (c) 2007-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/visibilitymap.h,v 1.3 2009/01/01 17:23:56 momjian Exp $ + * $PostgreSQL: pgsql/src/include/access/visibilitymap.h,v 1.4 2009/06/11 14:49:09 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -21,9 +21,9 @@ extern void visibilitymap_clear(Relation rel, BlockNumber heapBlk); extern void visibilitymap_pin(Relation rel, BlockNumber heapBlk, - Buffer *vmbuf); + Buffer *vmbuf); extern void visibilitymap_set(Relation rel, BlockNumber heapBlk, - XLogRecPtr recptr, Buffer *vmbuf); + XLogRecPtr recptr, Buffer *vmbuf); extern bool visibilitymap_test(Relation rel, BlockNumber heapBlk, Buffer *vmbuf); extern void visibilitymap_truncate(Relation rel, BlockNumber heapblk); diff --git a/src/include/access/xact.h b/src/include/access/xact.h index f11766618d..880b41b707 100644 --- a/src/include/access/xact.h +++ b/src/include/access/xact.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/xact.h,v 1.97 2009/01/01 17:23:56 momjian Exp $ + * $PostgreSQL: pgsql/src/include/access/xact.h,v 1.98 2009/06/11 14:49:09 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -91,7 +91,7 @@ typedef struct xl_xact_commit int nrels; /* number of RelFileNodes */ int nsubxacts; /* number of subtransaction XIDs */ /* Array of RelFileNode(s) to drop at commit */ - RelFileNode xnodes[1]; /* VARIABLE LENGTH ARRAY */ + RelFileNode xnodes[1]; /* VARIABLE LENGTH ARRAY */ /* ARRAY OF COMMITTED SUBTRANSACTION XIDs FOLLOWS */ } xl_xact_commit; @@ -103,7 +103,7 @@ typedef struct xl_xact_abort int nrels; /* number of RelFileNodes */ int nsubxacts; /* number of subtransaction XIDs */ /* Array of RelFileNode(s) to drop at abort */ - RelFileNode xnodes[1]; /* VARIABLE LENGTH ARRAY */ + RelFileNode xnodes[1]; /* VARIABLE LENGTH ARRAY */ /* ARRAY OF ABORTED SUBTRANSACTION XIDs FOLLOWS */ } xl_xact_abort; diff --git a/src/include/access/xlogutils.h b/src/include/access/xlogutils.h index ad15f43c5b..e78493db4e 100644 --- a/src/include/access/xlogutils.h +++ b/src/include/access/xlogutils.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/xlogutils.h,v 1.28 2009/01/01 17:23:56 momjian Exp $ + * $PostgreSQL: pgsql/src/include/access/xlogutils.h,v 1.29 2009/06/11 14:49:09 momjian Exp $ */ #ifndef XLOG_UTILS_H #define XLOG_UTILS_H @@ -23,11 +23,11 @@ extern void XLogCheckInvalidPages(void); extern void XLogDropRelation(RelFileNode rnode, ForkNumber forknum); extern void XLogDropDatabase(Oid dbid); extern void XLogTruncateRelation(RelFileNode rnode, ForkNumber forkNum, - BlockNumber nblocks); + BlockNumber nblocks); extern Buffer XLogReadBuffer(RelFileNode rnode, BlockNumber blkno, bool init); extern Buffer XLogReadBufferExtended(RelFileNode rnode, ForkNumber forknum, - BlockNumber blkno, ReadBufferMode mode); + BlockNumber blkno, ReadBufferMode mode); extern Relation CreateFakeRelcacheEntry(RelFileNode rnode); extern void FreeFakeRelcacheEntry(Relation fakerel); |