PostgreSQL Source Code
git master
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
c
d
g
h
i
k
l
m
p
r
s
t
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
c
d
f
h
i
n
o
p
r
s
t
~
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
attnum.h
Go to the documentation of this file.
1
/*-------------------------------------------------------------------------
2
*
3
* attnum.h
4
* POSTGRES attribute number definitions.
5
*
6
*
7
* Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
8
* Portions Copyright (c) 1994, Regents of the University of California
9
*
10
* src/include/access/attnum.h
11
*
12
*-------------------------------------------------------------------------
13
*/
14
#ifndef ATTNUM_H
15
#define ATTNUM_H
16
17
18
/*
19
* user defined attribute numbers start at 1. -ay 2/95
20
*/
21
typedef
int16
AttrNumber
;
22
23
#define InvalidAttrNumber 0
24
#define MaxAttrNumber 32767
25
26
/* ----------------
27
* support macros
28
* ----------------
29
*/
30
/*
31
* AttributeNumberIsValid
32
* True iff the attribute number is valid.
33
*/
34
#define AttributeNumberIsValid(attributeNumber) \
35
((bool) ((attributeNumber) != InvalidAttrNumber))
36
37
/*
38
* AttrNumberIsForUserDefinedAttr
39
* True iff the attribute number corresponds to a user defined attribute.
40
*/
41
#define AttrNumberIsForUserDefinedAttr(attributeNumber) \
42
((bool) ((attributeNumber) > 0))
43
44
/*
45
* AttrNumberGetAttrOffset
46
* Returns the attribute offset for an attribute number.
47
*
48
* Note:
49
* Assumes the attribute number is for a user defined attribute.
50
*/
51
#define AttrNumberGetAttrOffset(attNum) \
52
( \
53
AssertMacro(AttrNumberIsForUserDefinedAttr(attNum)), \
54
((attNum) - 1) \
55
)
56
57
/*
58
* AttrOffsetGetAttrNumber
59
* Returns the attribute number for an attribute offset.
60
*/
61
#define AttrOffsetGetAttrNumber(attributeOffset) \
62
((AttrNumber) (1 + (attributeOffset)))
63
64
#endif
/* ATTNUM_H */
AttrNumber
int16 AttrNumber
Definition:
attnum.h:21
int16
int16_t int16
Definition:
c.h:497
src
include
access
attnum.h
Generated on Tue Apr 8 2025 18:13:25 for PostgreSQL Source Code by
1.9.4