PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
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

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

Definition at line 70 of file itemid.h.

Referenced by heap_page_items().

#define ItemIdGetOffset (   itemId)    ((itemId)->lp_off)
#define ItemIdGetRedirect (   itemId)    ((itemId)->lp_off)
#define ItemIdIsValid (   itemId)    PointerIsValid(itemId)

Definition at line 85 of file itemid.h.

Referenced by bt_page_print_tuples(), and hash_page_items().

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

Definition at line 178 of file itemid.h.

Referenced by _bt_check_unique(), _bt_killitems(), _hash_kill_items(), and gistkillitems().

#define ItemIdSetDead (   itemId)
Value:
( \
(itemId)->lp_flags = LP_DEAD, \
(itemId)->lp_off = 0, \
(itemId)->lp_len = 0 \
)
#define LP_DEAD
Definition: itemid.h:40

Definition at line 163 of file itemid.h.

Referenced by heap_page_prune_execute().

#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:38

Definition at line 139 of file itemid.h.

Referenced by PageAddItemExtended(), and PageIndexTupleOverwrite().

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

Definition at line 151 of file itemid.h.

Referenced by heap_page_prune_execute().

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

Definition at line 127 of file itemid.h.

Referenced by _bt_buildadd(), heap_page_prune_execute(), lazy_vacuum_page(), PageIndexTupleDeleteNoCompact(), and PageRepairFragmentation().

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

Definition at line 40 of file itemid.h.

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

Definition at line 38 of file itemid.h.

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

Definition at line 39 of file itemid.h.

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

Definition at line 37 of file itemid.h.

Referenced by mask_lp_flags().

Typedef Documentation

Definition at line 31 of file itemid.h.

Definition at line 47 of file itemid.h.

Definition at line 46 of file itemid.h.