Consistently use "superuser" instead of "super user"
[pgsql.git] / src / include / access / attnum.h
blob0c43e26c2d6192e1d7e8cdafc20c2fee0d56eabd
1 /*-------------------------------------------------------------------------
3 * attnum.h
4 * POSTGRES attribute number definitions.
7 * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * src/include/access/attnum.h
12 *-------------------------------------------------------------------------
14 #ifndef ATTNUM_H
15 #define ATTNUM_H
19 * user defined attribute numbers start at 1. -ay 2/95
21 typedef int16 AttrNumber;
23 #define InvalidAttrNumber 0
24 #define MaxAttrNumber 32767
26 /* ----------------
27 * support macros
28 * ----------------
31 * AttributeNumberIsValid
32 * True iff the attribute number is valid.
34 #define AttributeNumberIsValid(attributeNumber) \
35 ((bool) ((attributeNumber) != InvalidAttrNumber))
38 * AttrNumberIsForUserDefinedAttr
39 * True iff the attribute number corresponds to an user defined attribute.
41 #define AttrNumberIsForUserDefinedAttr(attributeNumber) \
42 ((bool) ((attributeNumber) > 0))
45 * AttrNumberGetAttrOffset
46 * Returns the attribute offset for an attribute number.
48 * Note:
49 * Assumes the attribute number is for a user defined attribute.
51 #define AttrNumberGetAttrOffset(attNum) \
52 ( \
53 AssertMacro(AttrNumberIsForUserDefinedAttr(attNum)), \
54 ((attNum) - 1) \
58 * AttrOffsetGetAttrNumber
59 * Returns the attribute number for an attribute offset.
61 #define AttrOffsetGetAttrNumber(attributeOffset) \
62 ((AttrNumber) (1 + (attributeOffset)))
64 #endif /* ATTNUM_H */