PostgreSQL Source Code  git master
itemid.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  ItemIdData
 

Macros

#define LP_UNUSED   0 /* unused (should always have lp_len=0) */
 
#define LP_NORMAL   1 /* used (should always have lp_len>0) */
 
#define LP_REDIRECT   2 /* HOT redirect (should have lp_len=0) */
 
#define LP_DEAD   3 /* dead, may or may not have storage */
 
#define ItemIdGetLength(itemId)    ((itemId)->lp_len)
 
#define ItemIdGetOffset(itemId)    ((itemId)->lp_off)
 
#define ItemIdGetFlags(itemId)    ((itemId)->lp_flags)
 
#define ItemIdGetRedirect(itemId)    ((itemId)->lp_off)
 
#define ItemIdIsValid(itemId)   PointerIsValid(itemId)
 
#define ItemIdIsUsed(itemId)    ((itemId)->lp_flags != LP_UNUSED)
 
#define ItemIdIsNormal(itemId)    ((itemId)->lp_flags == LP_NORMAL)
 
#define ItemIdIsRedirected(itemId)    ((itemId)->lp_flags == LP_REDIRECT)
 
#define ItemIdIsDead(itemId)    ((itemId)->lp_flags == LP_DEAD)
 
#define ItemIdHasStorage(itemId)    ((itemId)->lp_len != 0)
 
#define ItemIdSetUnused(itemId)
 
#define ItemIdSetNormal(itemId, off, len)
 
#define ItemIdSetRedirect(itemId, link)
 
#define ItemIdSetDead(itemId)
 
#define ItemIdMarkDead(itemId)
 

Typedefs

typedef struct ItemIdData ItemIdData
 
typedef ItemIdDataItemId
 
typedef uint16 ItemOffset
 
typedef uint16 ItemLength
 

Macro Definition Documentation

◆ ItemIdGetFlags

#define ItemIdGetFlags (   itemId)     ((itemId)->lp_flags)

Definition at line 71 of file itemid.h.

◆ ItemIdGetLength

#define ItemIdGetLength (   itemId)     ((itemId)->lp_len)

Definition at line 59 of file itemid.h.

◆ ItemIdGetOffset

#define ItemIdGetOffset (   itemId)     ((itemId)->lp_off)

Definition at line 65 of file itemid.h.

◆ ItemIdGetRedirect

#define ItemIdGetRedirect (   itemId)     ((itemId)->lp_off)

Definition at line 78 of file itemid.h.

◆ ItemIdHasStorage

#define ItemIdHasStorage (   itemId)     ((itemId)->lp_len != 0)

Definition at line 120 of file itemid.h.

◆ ItemIdIsDead

#define ItemIdIsDead (   itemId)     ((itemId)->lp_flags == LP_DEAD)

Definition at line 113 of file itemid.h.

◆ ItemIdIsNormal

#define ItemIdIsNormal (   itemId)     ((itemId)->lp_flags == LP_NORMAL)

Definition at line 99 of file itemid.h.

◆ ItemIdIsRedirected

#define ItemIdIsRedirected (   itemId)     ((itemId)->lp_flags == LP_REDIRECT)

Definition at line 106 of file itemid.h.

◆ ItemIdIsUsed

#define ItemIdIsUsed (   itemId)     ((itemId)->lp_flags != LP_UNUSED)

Definition at line 92 of file itemid.h.

◆ ItemIdIsValid

#define ItemIdIsValid (   itemId)    PointerIsValid(itemId)

Definition at line 86 of file itemid.h.

◆ ItemIdMarkDead

#define ItemIdMarkDead (   itemId)
Value:
( \
(itemId)->lp_flags = LP_DEAD \
)
#define LP_DEAD
Definition: itemid.h:41

Definition at line 179 of file itemid.h.

◆ ItemIdSetDead

#define ItemIdSetDead (   itemId)
Value:
( \
(itemId)->lp_flags = LP_DEAD, \
(itemId)->lp_off = 0, \
(itemId)->lp_len = 0 \
)

Definition at line 164 of file itemid.h.

◆ ItemIdSetNormal

#define ItemIdSetNormal (   itemId,
  off,
  len 
)
Value:
( \
(itemId)->lp_flags = LP_NORMAL, \
(itemId)->lp_off = (off), \
(itemId)->lp_len = (len) \
)
#define LP_NORMAL
Definition: itemid.h:39
const void size_t len

Definition at line 140 of file itemid.h.

◆ ItemIdSetRedirect

#define ItemIdSetRedirect (   itemId,
  link 
)
Value:
( \
(itemId)->lp_flags = LP_REDIRECT, \
(itemId)->lp_off = (link), \
(itemId)->lp_len = 0 \
)
#define LP_REDIRECT
Definition: itemid.h:40
int link(const char *src, const char *dst)

Definition at line 152 of file itemid.h.

◆ ItemIdSetUnused

#define ItemIdSetUnused (   itemId)
Value:
( \
(itemId)->lp_flags = LP_UNUSED, \
(itemId)->lp_off = 0, \
(itemId)->lp_len = 0 \
)
#define LP_UNUSED
Definition: itemid.h:38

Definition at line 128 of file itemid.h.

◆ LP_DEAD

#define LP_DEAD   3 /* dead, may or may not have storage */

Definition at line 41 of file itemid.h.

◆ LP_NORMAL

#define LP_NORMAL   1 /* used (should always have lp_len>0) */

Definition at line 39 of file itemid.h.

◆ LP_REDIRECT

#define LP_REDIRECT   2 /* HOT redirect (should have lp_len=0) */

Definition at line 40 of file itemid.h.

◆ LP_UNUSED

#define LP_UNUSED   0 /* unused (should always have lp_len=0) */

Definition at line 38 of file itemid.h.

Typedef Documentation

◆ ItemId

typedef ItemIdData* ItemId

Definition at line 32 of file itemid.h.

◆ ItemIdData

typedef struct ItemIdData ItemIdData

◆ ItemLength

typedef uint16 ItemLength

Definition at line 48 of file itemid.h.

◆ ItemOffset

typedef uint16 ItemOffset

Definition at line 47 of file itemid.h.