|
#define | GIN_DATA (1 << 0) |
|
#define | GIN_LEAF (1 << 1) |
|
#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_INCOMPLETE_SPLIT |
|
#define | GIN_COMPRESSED (1 << 7) |
|
#define | GIN_METAPAGE_BLKNO (0) |
|
#define | GIN_ROOT_BLKNO (1) |
|
#define | GIN_CURRENT_VERSION 2 |
|
#define | GinPageGetMeta(p) ((GinMetaPageData *) PageGetContents(p)) |
|
#define | GinPageGetOpaque(page) ( (GinPageOpaque) PageGetSpecialPointer(page) ) |
|
#define | GinPageIsLeaf(page) ( (GinPageGetOpaque(page)->flags & GIN_LEAF) != 0 ) |
|
#define | GinPageSetLeaf(page) ( GinPageGetOpaque(page)->flags |= GIN_LEAF ) |
|
#define | GinPageSetNonLeaf(page) ( GinPageGetOpaque(page)->flags &= ~GIN_LEAF ) |
|
#define | GinPageIsData(page) ( (GinPageGetOpaque(page)->flags & GIN_DATA) != 0 ) |
|
#define | GinPageSetData(page) ( GinPageGetOpaque(page)->flags |= GIN_DATA ) |
|
#define | GinPageIsList(page) ( (GinPageGetOpaque(page)->flags & GIN_LIST) != 0 ) |
|
#define | GinPageSetList(page) ( GinPageGetOpaque(page)->flags |= GIN_LIST ) |
|
#define | GinPageHasFullRow(page) ( (GinPageGetOpaque(page)->flags & GIN_LIST_FULLROW) != 0 ) |
|
#define | GinPageSetFullRow(page) ( GinPageGetOpaque(page)->flags |= GIN_LIST_FULLROW ) |
|
#define | GinPageIsCompressed(page) ( (GinPageGetOpaque(page)->flags & GIN_COMPRESSED) != 0 ) |
|
#define | GinPageSetCompressed(page) ( GinPageGetOpaque(page)->flags |= GIN_COMPRESSED ) |
|
#define | GinPageIsDeleted(page) ( (GinPageGetOpaque(page)->flags & GIN_DELETED) != 0 ) |
|
#define | GinPageSetDeleted(page) ( GinPageGetOpaque(page)->flags |= GIN_DELETED) |
|
#define | GinPageSetNonDeleted(page) ( GinPageGetOpaque(page)->flags &= ~GIN_DELETED) |
|
#define | GinPageIsIncompleteSplit(page) ( (GinPageGetOpaque(page)->flags & GIN_INCOMPLETE_SPLIT) != 0 ) |
|
#define | GinPageRightMost(page) ( GinPageGetOpaque(page)->rightlink == InvalidBlockNumber) |
|
#define | GinPageGetDeleteXid(page) ( ((PageHeader) (page))->pd_prune_xid ) |
|
#define | GinPageSetDeleteXid(page, xid) ( ((PageHeader) (page))->pd_prune_xid = xid) |
|
#define | GinItemPointerGetBlockNumber(pointer) (ItemPointerGetBlockNumberNoCheck(pointer)) |
|
#define | GinItemPointerGetOffsetNumber(pointer) (ItemPointerGetOffsetNumberNoCheck(pointer)) |
|
#define | GinItemPointerSetBlockNumber(pointer, blkno) (ItemPointerSetBlockNumber((pointer), (blkno))) |
|
#define | GinItemPointerSetOffsetNumber(pointer, offnum) (ItemPointerSetOffsetNumber((pointer), (offnum))) |
|
#define | ItemPointerSetMin(p) ItemPointerSet((p), (BlockNumber)0, (OffsetNumber)0) |
|
#define | ItemPointerIsMin(p) |
|
#define | ItemPointerSetMax(p) ItemPointerSet((p), InvalidBlockNumber, (OffsetNumber)0xffff) |
|
#define | ItemPointerSetLossyPage(p, b) ItemPointerSet((p), (b), (OffsetNumber)0xffff) |
|
#define | ItemPointerIsLossyPage(p) |
|
#define | PostingItemGetBlockNumber(pointer) BlockIdGetBlockNumber(&(pointer)->child_blkno) |
|
#define | PostingItemSetBlockNumber(pointer, blockNumber) BlockIdSet(&((pointer)->child_blkno), (blockNumber)) |
|
#define | GIN_CAT_NORM_KEY 0 /* normal, non-null key value */ |
|
#define | GIN_CAT_NULL_KEY 1 /* null key value */ |
|
#define | GIN_CAT_EMPTY_ITEM 2 /* placeholder for zero-key item */ |
|
#define | GIN_CAT_NULL_ITEM 3 /* placeholder for null item */ |
|
#define | GIN_CAT_EMPTY_QUERY (-1) /* placeholder for full-scan query */ |
|
#define | GinCategoryOffset(itup, ginstate) |
|
#define | GinGetNullCategory(itup, ginstate) (*((GinNullCategory *) ((char*)(itup) + GinCategoryOffset(itup,ginstate)))) |
|
#define | GinSetNullCategory(itup, ginstate, c) (*((GinNullCategory *) ((char*)(itup) + GinCategoryOffset(itup,ginstate))) = (c)) |
|
#define | GinGetNPosting(itup) GinItemPointerGetOffsetNumber(&(itup)->t_tid) |
|
#define | GinSetNPosting(itup, n) ItemPointerSetOffsetNumber(&(itup)->t_tid,n) |
|
#define | GIN_TREE_POSTING ((OffsetNumber)0xffff) |
|
#define | GinIsPostingTree(itup) (GinGetNPosting(itup) == GIN_TREE_POSTING) |
|
#define | GinSetPostingTree(itup, blkno) ( GinSetNPosting((itup),GIN_TREE_POSTING), ItemPointerSetBlockNumber(&(itup)->t_tid, blkno) ) |
|
#define | GinGetPostingTree(itup) GinItemPointerGetBlockNumber(&(itup)->t_tid) |
|
#define | GIN_ITUP_COMPRESSED (1U << 31) |
|
#define | GinGetPostingOffset(itup) (GinItemPointerGetBlockNumber(&(itup)->t_tid) & (~GIN_ITUP_COMPRESSED)) |
|
#define | GinSetPostingOffset(itup, n) ItemPointerSetBlockNumber(&(itup)->t_tid,(n)|GIN_ITUP_COMPRESSED) |
|
#define | GinGetPosting(itup) ((Pointer) ((char*)(itup) + GinGetPostingOffset(itup))) |
|
#define | GinItupIsCompressed(itup) ((GinItemPointerGetBlockNumber(&(itup)->t_tid) & GIN_ITUP_COMPRESSED) != 0) |
|
#define | GinMaxItemSize |
|
#define | GinGetDownlink(itup) GinItemPointerGetBlockNumber(&(itup)->t_tid) |
|
#define | GinSetDownlink(itup, blkno) ItemPointerSet(&(itup)->t_tid, blkno, InvalidOffsetNumber) |
|
#define | GinDataLeafPageGetPostingList(page) (GinPostingList *) ((PageGetContents(page) + MAXALIGN(sizeof(ItemPointerData)))) |
|
#define | GinDataLeafPageGetPostingListSize(page) (((PageHeader) page)->pd_lower - MAXALIGN(SizeOfPageHeaderData) - MAXALIGN(sizeof(ItemPointerData))) |
|
#define | GinDataLeafPageIsEmpty(page) (GinPageIsCompressed(page) ? (GinDataLeafPageGetPostingListSize(page) == 0) : (GinPageGetOpaque(page)->maxoff < FirstOffsetNumber)) |
|
#define | GinDataLeafPageGetFreeSpace(page) PageGetExactFreeSpace(page) |
|
#define | GinDataPageGetRightBound(page) ((ItemPointer) PageGetContents(page)) |
|
#define | GinDataPageGetData(page) (PageGetContents(page) + MAXALIGN(sizeof(ItemPointerData))) |
|
#define | GinDataPageGetPostingItem(page, i) ((PostingItem *) (GinDataPageGetData(page) + ((i)-1) * sizeof(PostingItem))) |
|
#define | GinDataPageSetDataSize(page, size) |
|
#define | GinNonLeafDataPageGetFreeSpace(page) |
|
#define | GinDataPageMaxDataSize |
|
#define | GinListPageSize ( BLCKSZ - SizeOfPageHeaderData - MAXALIGN(sizeof(GinPageOpaqueData)) ) |
|
#define | SizeOfGinPostingList(plist) (offsetof(GinPostingList, bytes) + SHORTALIGN((plist)->nbytes) ) |
|
#define | GinNextPostingListSegment(cur) ((GinPostingList *) (((char *) (cur)) + SizeOfGinPostingList((cur)))) |
|