Header And Logo

PostgreSQL
| The world's most advanced open source database.

Data Structures | Defines | Typedefs

block.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  BlockIdData

Defines

#define InvalidBlockNumber   ((BlockNumber) 0xFFFFFFFF)
#define MaxBlockNumber   ((BlockNumber) 0xFFFFFFFE)
#define BlockNumberIsValid(blockNumber)   ((bool) ((BlockNumber) (blockNumber) != InvalidBlockNumber))
#define BlockIdIsValid(blockId)   ((bool) PointerIsValid(blockId))
#define BlockIdSet(blockId, blockNumber)
#define BlockIdCopy(toBlockId, fromBlockId)
#define BlockIdEquals(blockId1, blockId2)
#define BlockIdGetBlockNumber(blockId)

Typedefs

typedef uint32 BlockNumber
typedef struct BlockIdData BlockIdData
typedef BlockIdDataBlockId

Define Documentation

#define BlockIdCopy (   toBlockId,
  fromBlockId 
)
Value:
( \
    AssertMacro(PointerIsValid(toBlockId)), \
    AssertMacro(PointerIsValid(fromBlockId)), \
    (toBlockId)->bi_hi = (fromBlockId)->bi_hi, \
    (toBlockId)->bi_lo = (fromBlockId)->bi_lo \
)

Definition at line 95 of file block.h.

#define BlockIdEquals (   blockId1,
  blockId2 
)
Value:
((blockId1)->bi_hi == (blockId2)->bi_hi && \
     (blockId1)->bi_lo == (blockId2)->bi_lo)

Definition at line 107 of file block.h.

#define BlockIdGetBlockNumber (   blockId  ) 
Value:
( \
    AssertMacro(BlockIdIsValid(blockId)), \
    (BlockNumber) (((blockId)->bi_hi << 16) | ((uint16) (blockId)->bi_lo)) \
)

Definition at line 115 of file block.h.

Referenced by bt_page_items(), btree_xlog_split(), ItemPointerCompare(), pgstat_heap(), tidout(), and tidsend().

#define BlockIdIsValid (   blockId  )     ((bool) PointerIsValid(blockId))

Definition at line 77 of file block.h.

#define BlockIdSet (   blockId,
  blockNumber 
)
Value:
( \
    AssertMacro(PointerIsValid(blockId)), \
    (blockId)->bi_hi = (blockNumber) >> 16, \
    (blockId)->bi_lo = (blockNumber) & 0xffff \
)

Definition at line 84 of file block.h.

#define BlockNumberIsValid (   blockNumber  )     ((bool) ((BlockNumber) (blockNumber) != InvalidBlockNumber))
#define InvalidBlockNumber   ((BlockNumber) 0xFFFFFFFF)
#define MaxBlockNumber   ((BlockNumber) 0xFFFFFFFE)

Definition at line 35 of file block.h.

Referenced by pg_freespace().


Typedef Documentation

typedef BlockIdData* BlockId

Definition at line 59 of file block.h.

typedef struct BlockIdData BlockIdData

Definition at line 31 of file block.h.