PostgreSQL Source Code
git master
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
Functions
Variables
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
f
h
i
n
o
p
r
s
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
off.h
Go to the documentation of this file.
1
/*-------------------------------------------------------------------------
2
*
3
* off.h
4
* POSTGRES disk "offset" definitions.
5
*
6
*
7
* Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
8
* Portions Copyright (c) 1994, Regents of the University of California
9
*
10
* src/include/storage/off.h
11
*
12
*-------------------------------------------------------------------------
13
*/
14
#ifndef OFF_H
15
#define OFF_H
16
17
#include "
storage/itemid.h
"
18
/*
19
* OffsetNumber:
20
*
21
* this is a 1-based index into the linp (ItemIdData) array in the
22
* header of each disk page.
23
*/
24
typedef
uint16
OffsetNumber
;
25
26
#define InvalidOffsetNumber ((OffsetNumber) 0)
27
#define FirstOffsetNumber ((OffsetNumber) 1)
28
#define MaxOffsetNumber ((OffsetNumber) (BLCKSZ / sizeof(ItemIdData)))
29
30
/* ----------------
31
* support macros
32
* ----------------
33
*/
34
35
/*
36
* OffsetNumberIsValid
37
* True iff the offset number is valid.
38
*/
39
#define OffsetNumberIsValid(offsetNumber) \
40
((bool) ((offsetNumber != InvalidOffsetNumber) && \
41
(offsetNumber <= MaxOffsetNumber)))
42
43
/*
44
* OffsetNumberNext
45
* OffsetNumberPrev
46
* Increments/decrements the argument. These macros look pointless
47
* but they help us disambiguate the different manipulations on
48
* OffsetNumbers (e.g., sometimes we subtract one from an
49
* OffsetNumber to move back, and sometimes we do so to form a
50
* real C array index).
51
*/
52
#define OffsetNumberNext(offsetNumber) \
53
((OffsetNumber) (1 + (offsetNumber)))
54
#define OffsetNumberPrev(offsetNumber) \
55
((OffsetNumber) (-1 + (offsetNumber)))
56
57
#endif
/* OFF_H */
uint16
unsigned short uint16
Definition:
c.h:517
itemid.h
OffsetNumber
uint16 OffsetNumber
Definition:
off.h:24
src
include
storage
off.h
Generated on Sat Nov 23 2024 06:13:25 for PostgreSQL Source Code by
1.9.1