pg_attribute.h 28.2 KB
Newer Older
1 2
/*-------------------------------------------------------------------------
 *
3
 * pg_attribute.h
4 5
 *	  definition of the system "attribute" relation (pg_attribute)
 *	  along with the relation's initial contents.
6 7
 *
 *
8
 * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
B
Add:  
Bruce Momjian 已提交
9
 * Portions Copyright (c) 1994, Regents of the University of California
10
 *
B
Bruce Momjian 已提交
11
 * $Id: pg_attribute.h,v 1.70 2001/03/22 04:00:37 momjian Exp $
12 13
 *
 * NOTES
14 15
 *	  the genbki.sh script reads this file and generates .bki
 *	  information from the DATA() statements.
16
 *
17 18 19 20
 *	  utils/cache/relcache.c requires some hard-coded tuple descriptors
 *	  for some of the system catalogs so if the schema for any of
 *	  these changes, be sure and change the appropriate Schema_xxx
 *	  macros!  -cim 2/5/91
21 22 23 24 25
 *
 *-------------------------------------------------------------------------
 */
#ifndef PG_ATTRIBUTE_H
#define PG_ATTRIBUTE_H
26

27
/* ----------------
28 29 30
 *		postgres.h contains the system type definintions and the
 *		CATALOG(), BOOTSTRAP and DATA() sugar words so this file
 *		can be read by both genbki.sh and the C compiler.
31 32 33 34
 * ----------------
 */

/* ----------------
35 36
 *		pg_attribute definition.  cpp turns this into
 *		typedef struct FormData_pg_attribute
37
 *
38 39
 *		If you change the following, make sure you change the structs for
 *		system attributes in heap.c and index.c also.
40 41
 * ----------------
 */
42 43
CATALOG(pg_attribute) BOOTSTRAP
{
44 45
	Oid			attrelid;		/* OID of relation containing this
								 * attribute */
46 47
	NameData	attname;
	Oid			atttypid;
48

49 50 51 52 53 54 55
	/*
	 * atttypid is the OID of the instance in Catalog Class pg_type that
	 * defines the data type of this attribute (e.g. int4).  Information
	 * in that instance is redundant with the attlen, attbyval, and
	 * attalign attributes of this instance, so they had better match or
	 * Postgres will fail.
	 */
56

B
Bruce Momjian 已提交
57
	float4		attdispersion;
58

59
	/*
B
Bruce Momjian 已提交
60
	 * attdispersion is the dispersion statistic of the column (0.0 to
61 62
	 * 1.0), or zero if the statistic has not been calculated, or -1.0 if
	 * VACUUM found that the column contains no duplicate entries (in
B
Bruce Momjian 已提交
63
	 * which case the dispersion should be taken as 1.0/numberOfRows for
64
	 * the current table size).  The -1.0 hack is useful because the
B
Bruce Momjian 已提交
65
	 * number of rows may be updated more often than attdispersion is. We
66 67 68
	 * assume that the column will retain its no-duplicate-entry property.
	 * (Perhaps this should be driven off the existence of a UNIQUE index
	 * for the column, instead of being a statistical guess?)
69
	 */
70

71
	int2		attlen;
72

73 74
	/*
	 * attlen is a copy of the typlen field from pg_type for this
75
	 * attribute.  See atttypid above.	See struct Form_pg_type for
76 77 78
	 * definition.
	 */

79
	int2		attnum;
80

81 82 83 84 85 86 87 88 89 90 91 92 93 94
	/*
	 * attnum is the "attribute number" for the attribute:	A value that
	 * uniquely identifies this attribute within its class. For user
	 * attributes, Attribute numbers are greater than 0 and not greater
	 * than the number of attributes in the class. I.e. if the Class
	 * pg_class says that Class XYZ has 10 attributes, then the user
	 * attribute numbers in Class pg_attribute must be 1-10.
	 *
	 * System attributes have attribute numbers less than 0 that are unique
	 * within the class, but not constrained to any particular range.
	 *
	 * Note that (attnum - 1) is often used as the index to an array.
	 */

95
	int4		attnelems;		/* number of dimensions, if an array type */
96

97
	int4		attcacheoff;
98

99 100
	/*
	 * fastgetattr() uses attcacheoff to cache byte offsets of attributes
101
	 * in heap tuples.	The value actually stored in pg_attribute (-1)
102 103 104 105 106
	 * indicates no cached value.  But when we copy these tuples into a
	 * tuple descriptor, we may then update attcacheoff in the copies.
	 * This speeds up the attribute walking process.
	 */

107
	int4		atttypmod;
108

109
	/*
110 111 112 113 114
	 * atttypmod records type-specific data supplied at table creation
	 * time (for example, the max length of a varchar field).  It is
	 * passed to type-specific input and output functions as the third
	 * argument. The value will generally be -1 for types that do not need
	 * typmod.
115 116 117
	 */

	bool		attbyval;
118

119 120
	/*
	 * attbyval is a copy of the typbyval field from pg_type for this
121
	 * attribute.  See atttypid above.	See struct Form_pg_type for
122 123
	 * definition.
	 */
124

125
	char		attstorage;
126

127
	/*----------
128 129
	 * attstorage tells for VARLENA attributes, what the heap access
	 * methods can do to it if a given tuple doesn't fit into a page.
130 131 132
	 * Possible values are
	 *		'p': Value must be stored plain always
	 *		'e': Value can be stored in "secondary" relation (if relation
133
	 *			 has one, see pg_class.reltoastrelid)
134 135
	 *		'm': Value can be stored compressed inline
	 *		'x': Value can be stored compressed inline or in "secondary"
136 137
	 * Note that 'm' fields can also be moved out to secondary storage,
	 * but only as a last resort ('e' and 'x' fields are moved first).
138
	 *----------
139 140
	 */

141 142
	bool		attisset;
	char		attalign;
143

144 145
	/*
	 * attalign is a copy of the typalign field from pg_type for this
146
	 * attribute.  See atttypid above.	See struct Form_pg_type for
147 148 149
	 * definition.
	 */

150
	bool		attnotnull;
151

152
	/* This flag represents the "NOT NULL" constraint */
153
	bool		atthasdef;
154

155
	/* Has DEFAULT value or not */
156 157 158 159 160 161 162
} FormData_pg_attribute;

/*
 * someone should figure out how to do this properly. (The problem is
 * the size of the C struct is not the same as the size of the tuple.)
 */
#define ATTRIBUTE_TUPLE_SIZE \
163
	(offsetof(FormData_pg_attribute,atthasdef) + sizeof(char))
164 165

/* ----------------
166 167
 *		Form_pg_attribute corresponds to a pointer to a tuple with
 *		the format of pg_attribute relation.
168 169
 * ----------------
 */
170
typedef FormData_pg_attribute *Form_pg_attribute;
171 172

/* ----------------
173
 *		compiler constants for pg_attribute
174 175 176
 * ----------------
 */

177
#define Natts_pg_attribute				15
178 179 180
#define Anum_pg_attribute_attrelid		1
#define Anum_pg_attribute_attname		2
#define Anum_pg_attribute_atttypid		3
B
Bruce Momjian 已提交
181
#define Anum_pg_attribute_attdispersion 4
182 183 184
#define Anum_pg_attribute_attlen		5
#define Anum_pg_attribute_attnum		6
#define Anum_pg_attribute_attnelems		7
185
#define Anum_pg_attribute_attcacheoff	8
186 187
#define Anum_pg_attribute_atttypmod		9
#define Anum_pg_attribute_attbyval		10
188 189 190 191 192
#define Anum_pg_attribute_attstorage	11
#define Anum_pg_attribute_attisset		12
#define Anum_pg_attribute_attalign		13
#define Anum_pg_attribute_attnotnull	14
#define Anum_pg_attribute_atthasdef		15
193 194


195 196 197 198
#ifdef	_DROP_COLUMN_HACK__
/*
 *	CONSTANT and MACROS for DROP COLUMN implementation
 */
199 200 201 202
#define DROP_COLUMN_OFFSET	-20
#define COLUMN_IS_DROPPED(attribute)	((attribute)->attnum <= DROP_COLUMN_OFFSET)
#define DROPPED_COLUMN_INDEX(attidx)	(DROP_COLUMN_OFFSET - attidx)
#define ATTRIBUTE_DROP_COLUMN(attribute) \
203 204 205 206
	Assert((attribute)->attnum > 0); \
	(attribute)->attnum = DROPPED_COLUMN_INDEX((attribute)->attnum); \
	(attribute)->atttypid = (Oid) -1; \
	(attribute)->attnotnull = false; \
207 208
	(attribute)->atthasdef = false;
#endif	 /* _DROP_COLUMN_HACK__ */
209
/* ----------------
210 211
 *		SCHEMA_ macros for declaring hardcoded tuple descriptors.
 *		these are used in utils/cache/relcache.c
212 213 214 215 216
 * ----------------
#define SCHEMA_NAME(x) CppConcat(Name_,x)
#define SCHEMA_DESC(x) CppConcat(Desc_,x)
#define SCHEMA_NATTS(x) CppConcat(Natts_,x)
#define SCHEMA_DEF(x) \
217 218 219 220 221
	FormData_pg_attribute \
	SCHEMA_DESC(x) [ SCHEMA_NATTS(x) ] = \
	{ \
		CppConcat(Schema_,x) \
	}
222 223 224
 */

/* ----------------
225
 *		initial contents of pg_attribute
226 227 228 229
 * ----------------
 */

/* ----------------
230
 *		pg_type schema
231 232 233
 * ----------------
 */
#define Schema_pg_type \
234 235 236 237 238 239 240 241 242 243 244 245 246 247 248
{ 1247, {"typname"},	   19, 0, NAMEDATALEN,	1, 0, -1, -1, '\0', 'p', '\0', 'i', '\0', '\0' }, \
{ 1247, {"typowner"},	   23, 0,	4,	2, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
{ 1247, {"typlen"},		   21, 0,	2,	3, 0, -1, -1, '\001', 'p', '\0', 's', '\0', '\0' }, \
{ 1247, {"typprtlen"},	   21, 0,	2,	4, 0, -1, -1, '\001', 'p', '\0', 's', '\0', '\0' }, \
{ 1247, {"typbyval"},	   16, 0,	1,	5, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
{ 1247, {"typtype"},	   18, 0,	1,	6, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
{ 1247, {"typisdefined"},  16, 0,	1,	7, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
{ 1247, {"typdelim"},	   18, 0,	1,	8, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
{ 1247, {"typrelid"},	   26, 0,	4,	9, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
{ 1247, {"typelem"},	   26, 0,	4, 10, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
{ 1247, {"typinput"},	   24, 0,	4, 11, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
{ 1247, {"typoutput"},	   24, 0,	4, 12, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
{ 1247, {"typreceive"},    24, 0,	4, 13, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
{ 1247, {"typsend"},	   24, 0,	4, 14, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
{ 1247, {"typalign"},	   18, 0,	1, 15, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
B
Bruce Momjian 已提交
249
{ 1247, {"typstorage"},    18, 0,	1, 16, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
250
{ 1247, {"typdefault"},    25, 0,  -1, 17, 0, -1, -1, '\0'	, 'x', '\0', 'i', '\0', '\0' }
251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266

DATA(insert OID = 0 ( 1247 typname			19 0 NAMEDATALEN   1 0 -1 -1 f p f i f f));
DATA(insert OID = 0 ( 1247 typowner			23 0  4   2 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1247 typlen			21 0  2   3 0 -1 -1 t p f s f f));
DATA(insert OID = 0 ( 1247 typprtlen		21 0  2   4 0 -1 -1 t p f s f f));
DATA(insert OID = 0 ( 1247 typbyval			16 0  1   5 0 -1 -1 t p f c f f));
DATA(insert OID = 0 ( 1247 typtype			18 0  1   6 0 -1 -1 t p f c f f));
DATA(insert OID = 0 ( 1247 typisdefined		16 0  1   7 0 -1 -1 t p f c f f));
DATA(insert OID = 0 ( 1247 typdelim			18 0  1   8 0 -1 -1 t p f c f f));
DATA(insert OID = 0 ( 1247 typrelid			26 0  4   9 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1247 typelem			26 0  4  10 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1247 typinput			24 0  4  11 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1247 typoutput		24 0  4  12 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1247 typreceive		24 0  4  13 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1247 typsend			24 0  4  14 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1247 typalign			18 0  1  15 0 -1 -1 t p f c f f));
J
TOAST  
Jan Wieck 已提交
267
DATA(insert OID = 0 ( 1247 typstorage		18 0  1  16 0 -1 -1 t p f c f f));
268
DATA(insert OID = 0 ( 1247 typdefault		25 0 -1  17 0 -1 -1 f x f i f f));
269 270 271 272 273 274
DATA(insert OID = 0 ( 1247 ctid				27 0  6  -1 0 -1 -1 f p f i f f));
DATA(insert OID = 0 ( 1247 oid				26 0  4  -2 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1247 xmin				28 0  4  -3 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1247 cmin				29 0  4  -4 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1247 xmax				28 0  4  -5 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1247 cmax				29 0  4  -6 0 -1 -1 t p f i f f));
275
DATA(insert OID = 0 ( 1247 tableoid			26 0  4  -7 0 -1 -1 t p f i f f));
276 277

/* ----------------
278
 *		pg_database
279 280
 * ----------------
 */
281 282 283
DATA(insert OID = 0 ( 1262 datname			19 0 NAMEDATALEN   1 0 -1 -1 f p f i f f));
DATA(insert OID = 0 ( 1262 datdba			23 0  4   2 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1262 encoding			23 0  4   3 0 -1 -1 t p f i f f));
B
Bruce Momjian 已提交
284 285 286
DATA(insert OID = 0 ( 1262 datistemplate	16 0  1   4 0 -1 -1 t p f c f f));
DATA(insert OID = 0 ( 1262 datallowconn		16 0  1   5 0 -1 -1 t p f c f f));
DATA(insert OID = 0 ( 1262 datlastsysoid	26 0  4   6 0 -1 -1 t p f i f f));
287 288
/* do not mark datpath as toastable; GetRawDatabaseInfo won't cope */
DATA(insert OID = 0 ( 1262 datpath			25 0 -1   7 0 -1 -1 f p f i f f));
289 290 291 292 293 294
DATA(insert OID = 0 ( 1262 ctid				27 0  6  -1 0 -1 -1 f p f i f f));
DATA(insert OID = 0 ( 1262 oid				26 0  4  -2 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1262 xmin				28 0  4  -3 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1262 cmin				29 0  4  -4 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1262 xmax				28 0  4  -5 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1262 cmax				29 0  4  -6 0 -1 -1 t p f i f f));
295
DATA(insert OID = 0 ( 1262 tableoid			26 0  4  -7 0 -1 -1 t p f i f f));
296

297
/* ----------------
298
 *		pg_proc
299 300 301
 * ----------------
 */
#define Schema_pg_proc \
302 303 304 305 306 307
{ 1255, {"proname"},			19, 0, NAMEDATALEN,  1, 0, -1, -1, '\0', 'p', '\0', 'i', '\0', '\0' }, \
{ 1255, {"proowner"},			23, 0,	4,	2, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
{ 1255, {"prolang"},			26, 0,	4,	3, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
{ 1255, {"proisinh"},			16, 0,	1,	4, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
{ 1255, {"proistrusted"},		16, 0,	1,	5, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
{ 1255, {"proiscachable"},		16, 0,	1,	6, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
308 309 310 311 312 313 314 315 316
{ 1255, {"proisstrict"},		16, 0,	1,	7, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
{ 1255, {"pronargs"},			21, 0,	2,	8, 0, -1, -1, '\001', 'p', '\0', 's', '\0', '\0' }, \
{ 1255, {"proretset"},			16, 0,	1,	9, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
{ 1255, {"prorettype"},			26, 0,	4, 10, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
{ 1255, {"proargtypes"},		30, 0, INDEX_MAX_KEYS*4, 11, 0, -1, -1, '\0', 'p', '\0', 'i', '\0', '\0' }, \
{ 1255, {"probyte_pct"},		23, 0,	4, 12, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
{ 1255, {"properbyte_cpu"},		23, 0,	4, 13, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
{ 1255, {"propercall_cpu"},		23, 0,	4, 14, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
{ 1255, {"prooutin_ratio"},		23, 0,	4, 15, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
317 318
{ 1255, {"prosrc"},				25, 0, -1, 16, 0, -1, -1, '\0', 'x', '\0', 'i', '\0', '\0' }, \
{ 1255, {"probin"},				17, 0, -1, 17, 0, -1, -1, '\0', 'x', '\0', 'i', '\0', '\0' }
319 320 321 322 323 324 325

DATA(insert OID = 0 ( 1255 proname			19 0 NAMEDATALEN   1 0 -1 -1 f p f i f f));
DATA(insert OID = 0 ( 1255 proowner			23 0  4   2 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1255 prolang			26 0  4   3 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1255 proisinh			16 0  1   4 0 -1 -1 t p f c f f));
DATA(insert OID = 0 ( 1255 proistrusted		16 0  1   5 0 -1 -1 t p f c f f));
DATA(insert OID = 0 ( 1255 proiscachable	16 0  1   6 0 -1 -1 t p f c f f));
326 327 328 329 330 331 332 333 334
DATA(insert OID = 0 ( 1255 proisstrict		16 0  1   7 0 -1 -1 t p f c f f));
DATA(insert OID = 0 ( 1255 pronargs			21 0  2   8 0 -1 -1 t p f s f f));
DATA(insert OID = 0 ( 1255 proretset		16 0  1   9 0 -1 -1 t p f c f f));
DATA(insert OID = 0 ( 1255 prorettype		26 0  4  10 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1255 proargtypes		30 0 INDEX_MAX_KEYS*4 11 0 -1 -1 f p f i f f));
DATA(insert OID = 0 ( 1255 probyte_pct		23 0  4  12 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1255 properbyte_cpu	23 0  4  13 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1255 propercall_cpu	23 0  4  14 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1255 prooutin_ratio	23 0  4  15 0 -1 -1 t p f i f f));
335 336
DATA(insert OID = 0 ( 1255 prosrc			25 0 -1  16 0 -1 -1 f x f i f f));
DATA(insert OID = 0 ( 1255 probin			17 0 -1  17 0 -1 -1 f x f i f f));
337 338 339 340 341 342
DATA(insert OID = 0 ( 1255 ctid				27 0  6  -1 0 -1 -1 f p f i f f));
DATA(insert OID = 0 ( 1255 oid				26 0  4  -2 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1255 xmin				28 0  4  -3 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1255 cmin				29 0  4  -4 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1255 xmax				28 0  4  -5 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1255 cmax				29 0  4  -6 0 -1 -1 t p f i f f));
343
DATA(insert OID = 0 ( 1255 tableoid			26 0  4  -7 0 -1 -1 t p f i f f));
344

345
/* ----------------
346
 *		pg_shadow
347 348
 * ----------------
 */
349 350
DATA(insert OID = 0 ( 1260 usename			19	0 NAMEDATALEN	1 0 -1 -1 f p f i f f));
DATA(insert OID = 0 ( 1260 usesysid			23	0	4	2 0 -1 -1 t p f i f f));
351 352 353 354
DATA(insert OID = 0 ( 1260 usecreatedb		16	0	1	3 0 -1 -1 t p f c f f));
DATA(insert OID = 0 ( 1260 usetrace			16	0	1	4 0 -1 -1 t p f c f f));
DATA(insert OID = 0 ( 1260 usesuper			16	0	1	5 0 -1 -1 t p f c f f));
DATA(insert OID = 0 ( 1260 usecatupd		16	0	1	6 0 -1 -1 t p f c f f));
355
DATA(insert OID = 0 ( 1260 passwd			25	0  -1	7 0 -1 -1 f x f i f f));
356
DATA(insert OID = 0 ( 1260 valuntil			702 0	4	8 0 -1 -1 t p f i f f));
357 358 359 360 361 362
DATA(insert OID = 0 ( 1260 ctid				27 0  6  -1 0 -1 -1 f p f i f f));
DATA(insert OID = 0 ( 1260 oid				26 0  4  -2 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1260 xmin				28 0  4  -3 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1260 cmin				29 0  4  -4 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1260 xmax				28 0  4  -5 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1260 cmax				29 0  4  -6 0 -1 -1 t p f i f f));
363
DATA(insert OID = 0 ( 1260 tableoid			26 0  4  -7 0 -1 -1 t p f i f f));
364 365

/* ----------------
366
 *		pg_group
367 368
 * ----------------
 */
369 370
DATA(insert OID = 0 ( 1261 groname			19 0 NAMEDATALEN  1 0 -1 -1 f p f i f f));
DATA(insert OID = 0 ( 1261 grosysid			23 0  4   2 0 -1 -1 t p f i f f));
371
DATA(insert OID = 0 ( 1261 grolist		  1007 0 -1   3 0 -1 -1 f x f i f f));
372 373 374 375 376 377
DATA(insert OID = 0 ( 1261 ctid				27 0  6  -1 0 -1 -1 f p f i f f));
DATA(insert OID = 0 ( 1261 oid				26 0  4  -2 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1261 xmin				28 0  4  -3 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1261 cmin				29 0  4  -4 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1261 xmax				28 0  4  -5 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1261 cmax				29 0  4  -6 0 -1 -1 t p f i f f));
378
DATA(insert OID = 0 ( 1261 tableoid			26 0  4  -7 0 -1 -1 t p f i f f));
379

380
/* ----------------
381
 *		pg_attribute
382 383 384
 * ----------------
 */
#define Schema_pg_attribute \
385 386 387
{ 1249, {"attrelid"},	  26, 0,	4,	1, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
{ 1249, {"attname"},	  19, 0, NAMEDATALEN,	2, 0, -1, -1, '\0', 'p', '\0', 'i', '\0', '\0' }, \
{ 1249, {"atttypid"},	  26, 0,	4,	3, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
B
Bruce Momjian 已提交
388
{ 1249, {"attdispersion"}, 700, 0,	4,	4, 0, -1, -1, '\0', 'p', '\0', 'i', '\0', '\0' }, \
389 390 391 392 393 394
{ 1249, {"attlen"},		  21, 0,	2,	5, 0, -1, -1, '\001', 'p', '\0', 's', '\0', '\0' }, \
{ 1249, {"attnum"},		  21, 0,	2,	6, 0, -1, -1, '\001', 'p', '\0', 's', '\0', '\0' }, \
{ 1249, {"attnelems"},	  23, 0,	4,	7, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
{ 1249, {"attcacheoff"},  23, 0,	4,	8, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
{ 1249, {"atttypmod"},	  23, 0,	4,	9, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
{ 1249, {"attbyval"},	  16, 0,	1, 10, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
395
{ 1249, {"attstorage"},   18, 0,	1, 11, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
396 397 398 399 400 401 402 403
{ 1249, {"attisset"},	  16, 0,	1, 12, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
{ 1249, {"attalign"},	  18, 0,	1, 13, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
{ 1249, {"attnotnull"},  16, 0, 1, 14, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
{ 1249, {"atthasdef"},	 16, 0, 1, 15, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }

DATA(insert OID = 0 ( 1249 attrelid			26 0  4   1 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1249 attname			19 0 NAMEDATALEN  2 0 -1 -1 f p f i f f));
DATA(insert OID = 0 ( 1249 atttypid			26 0  4   3 0 -1 -1 t p f i f f));
B
Bruce Momjian 已提交
404
DATA(insert OID = 0 ( 1249 attdispersion   700 0  4   4 0 -1 -1 f p f i f f));
405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421
DATA(insert OID = 0 ( 1249 attlen			21 0  2   5 0 -1 -1 t p f s f f));
DATA(insert OID = 0 ( 1249 attnum			21 0  2   6 0 -1 -1 t p f s f f));
DATA(insert OID = 0 ( 1249 attnelems		23 0  4   7 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1249 attcacheoff		23 0  4   8 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1249 atttypmod		23 0  4   9 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1249 attbyval			16 0  1  10 0 -1 -1 t p f c f f));
DATA(insert OID = 0 ( 1249 attstorage		18 0  1  11 0 -1 -1 t p f c f f));
DATA(insert OID = 0 ( 1249 attisset			16 0  1  12 0 -1 -1 t p f c f f));
DATA(insert OID = 0 ( 1249 attalign			18 0  1  13 0 -1 -1 t p f c f f));
DATA(insert OID = 0 ( 1249 attnotnull		16 0  1  14 0 -1 -1 t p f c f f));
DATA(insert OID = 0 ( 1249 atthasdef		16 0  1  15 0 -1 -1 t p f c f f));
DATA(insert OID = 0 ( 1249 ctid				27 0  6  -1 0 -1 -1 f p f i f f));
DATA(insert OID = 0 ( 1249 oid				26 0  4  -2 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1249 xmin				28 0  4  -3 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1249 cmin				29 0  4  -4 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1249 xmax				28 0  4  -5 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1249 cmax				29 0  4  -6 0 -1 -1 t p f i f f));
422
DATA(insert OID = 0 ( 1249 tableoid			26 0  4  -7 0 -1 -1 t p f i f f));
423

424
/* ----------------
425
 *		pg_class
426 427 428
 * ----------------
 */
#define Schema_pg_class \
429 430 431 432
{ 1259, {"relname"},	   19, 0, NAMEDATALEN,	1, 0, -1, -1, '\0', 'p', '\0', 'i', '\0', '\0' }, \
{ 1259, {"reltype"},	   26, 0,	4,	2, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
{ 1259, {"relowner"},	   23, 0,	4,	3, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
{ 1259, {"relam"},		   26, 0,	4,	4, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450
{ 1259, {"relfilenode"},   26, 0,	4,	5, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
{ 1259, {"relpages"},	   23, 0,	4,	6, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
{ 1259, {"reltuples"},	   23, 0,	4,	7, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
{ 1259, {"reltoastrelid"}, 26, 0,	4,	8, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
{ 1259, {"reltoastidxid"}, 26, 0,	4,	9, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
{ 1259, {"relhasindex"},   16, 0,	1, 10, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
{ 1259, {"relisshared"},   16, 0,	1, 11, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
{ 1259, {"relkind"},	   18, 0,	1, 12, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
{ 1259, {"relnatts"},	   21, 0,	2, 13, 0, -1, -1, '\001', 'p', '\0', 's', '\0', '\0' }, \
{ 1259, {"relchecks"},	   21, 0,	2, 14, 0, -1, -1, '\001', 'p', '\0', 's', '\0', '\0' }, \
{ 1259, {"reltriggers"},   21, 0,	2, 15, 0, -1, -1, '\001', 'p', '\0', 's', '\0', '\0' }, \
{ 1259, {"relukeys"},	   21, 0,	2, 16, 0, -1, -1, '\001', 'p', '\0', 's', '\0', '\0' }, \
{ 1259, {"relfkeys"},	   21, 0,	2, 17, 0, -1, -1, '\001', 'p', '\0', 's', '\0', '\0' }, \
{ 1259, {"relrefs"},	   21, 0,	2, 18, 0, -1, -1, '\001', 'p', '\0', 's', '\0', '\0' }, \
{ 1259, {"relhaspkey"},    16, 0,	1, 19, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
{ 1259, {"relhasrules"},   16, 0,	1, 20, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
{ 1259, {"relhassubclass"},16, 0,	1, 21, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
{ 1259, {"relacl"},		 1034, 0,  -1, 22, 0, -1, -1,	'\0', 'x', '\0', 'i', '\0', '\0' }
451 452 453 454 455

DATA(insert OID = 0 ( 1259 relname			19 0 NAMEDATALEN   1 0 -1 -1 f p f i f f));
DATA(insert OID = 0 ( 1259 reltype			26 0  4   2 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1259 relowner			23 0  4   3 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1259 relam			26 0  4   4 0 -1 -1 t p f i f f));
456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473
DATA(insert OID = 0 ( 1259 relfilenode		26 0  4   5 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1259 relpages			23 0  4   6 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1259 reltuples		23 0  4   7 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1259 reltoastrelid	26 0  4   8 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1259 reltoastidxid	26 0  4   9 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1259 relhasindex		16 0  1  10 0 -1 -1 t p f c f f));
DATA(insert OID = 0 ( 1259 relisshared		16 0  1  11 0 -1 -1 t p f c f f));
DATA(insert OID = 0 ( 1259 relkind			18 0  1  12 0 -1 -1 t p f c f f));
DATA(insert OID = 0 ( 1259 relnatts			21 0  2  13 0 -1 -1 t p f s f f));
DATA(insert OID = 0 ( 1259 relchecks		21 0  2  14 0 -1 -1 t p f s f f));
DATA(insert OID = 0 ( 1259 reltriggers		21 0  2  15 0 -1 -1 t p f s f f));
DATA(insert OID = 0 ( 1259 relukeys			21 0  2  16 0 -1 -1 t p f s f f));
DATA(insert OID = 0 ( 1259 relfkeys			21 0  2  17 0 -1 -1 t p f s f f));
DATA(insert OID = 0 ( 1259 relrefs			21 0  2  18 0 -1 -1 t p f s f f));
DATA(insert OID = 0 ( 1259 relhaspkey		16 0  1  19 0 -1 -1 t p f c f f));
DATA(insert OID = 0 ( 1259 relhasrules		16 0  1  20 0 -1 -1 t p f c f f));
DATA(insert OID = 0 ( 1259 relhassubclass	16 0  1  21 0 -1 -1 t p f c f f));
DATA(insert OID = 0 ( 1259 relacl		  1034 0 -1  22 0 -1 -1 f x f i f f));
474 475 476 477 478 479
DATA(insert OID = 0 ( 1259 ctid				27 0  6  -1 0 -1 -1 f p f i f f));
DATA(insert OID = 0 ( 1259 oid				26 0  4  -2 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1259 xmin				28 0  4  -3 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1259 cmin				29 0  4  -4 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1259 xmax				28 0  4  -5 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1259 cmax				29 0  4  -6 0 -1 -1 t p f i f f));
480
DATA(insert OID = 0 ( 1259 tableoid			26 0  4  -7 0 -1 -1 t p f i f f));
481

482
/* ----------------
483
 *		pg_attrdef
484 485
 * ----------------
 */
486 487
DATA(insert OID = 0 ( 1215 adrelid			26 0  4   1 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1215 adnum			21 0  2   2 0 -1 -1 t p f s f f));
488 489
DATA(insert OID = 0 ( 1215 adbin			25 0 -1   3 0 -1 -1 f x f i f f));
DATA(insert OID = 0 ( 1215 adsrc			25 0 -1   4 0 -1 -1 f x f i f f));
490 491 492 493 494 495
DATA(insert OID = 0 ( 1215 ctid				27 0  6  -1 0 -1 -1 f p f i f f));
DATA(insert OID = 0 ( 1215 oid				26 0  4  -2 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1215 xmin				28 0  4  -3 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1215 cmin				29 0  4  -4 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1215 xmax				28 0  4  -5 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1215 cmax				29 0  4  -6 0 -1 -1 t p f i f f));
496
DATA(insert OID = 0 ( 1215 tableoid			26 0  4  -7 0 -1 -1 t p f i f f));
497

498
/* ----------------
499
 *		pg_relcheck
500 501
 * ----------------
 */
502 503
DATA(insert OID = 0 ( 1216 rcrelid			26 0  4   1 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1216 rcname			19 0  NAMEDATALEN  2 0 -1 -1 f p f i f f));
504 505
DATA(insert OID = 0 ( 1216 rcbin			25 0 -1   3 0 -1 -1 f x f i f f));
DATA(insert OID = 0 ( 1216 rcsrc			25 0 -1   4 0 -1 -1 f x f i f f));
506 507 508 509 510 511
DATA(insert OID = 0 ( 1216 ctid				27 0  6  -1 0 -1 -1 f p f i f f));
DATA(insert OID = 0 ( 1216 oid				26 0  4  -2 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1216 xmin				28 0  4  -3 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1216 cmin				29 0  4  -4 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1216 xmax				28 0  4  -5 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1216 cmax				29 0  4  -6 0 -1 -1 t p f i f f));
512
DATA(insert OID = 0 ( 1216 tableoid			26 0  4  -7 0 -1 -1 t p f i f f));
513

V
Vadim B. Mikheev 已提交
514
/* ----------------
515
 *		pg_trigger
V
Vadim B. Mikheev 已提交
516 517
 * ----------------
 */
518 519 520 521 522 523 524 525 526 527 528 529
DATA(insert OID = 0 ( 1219 tgrelid			26 0  4   1 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1219 tgname			19 0  NAMEDATALEN  2 0 -1 -1 f p f i f f));
DATA(insert OID = 0 ( 1219 tgfoid			26 0  4   3 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1219 tgtype			21 0  2   4 0 -1 -1 t p f s f f));
DATA(insert OID = 0 ( 1219 tgenabled		16 0  1   5 0 -1 -1 t p f c f f));
DATA(insert OID = 0 ( 1219 tgisconstraint	16 0  1   6 0 -1 -1 t p f c f f));
DATA(insert OID = 0 ( 1219 tgconstrname		19 0  NAMEDATALEN  7 0 -1 -1 f p f i f f));
DATA(insert OID = 0 ( 1219 tgconstrrelid	26 0  4   8 0 -1 -1 t p f i f f));

DATA(insert OID = 0 ( 1219 tgdeferrable		16 0  1   9 0 -1 -1 t p f c f f));
DATA(insert OID = 0 ( 1219 tginitdeferred	16 0  1   10 0 -1 -1 t p f c f f));
DATA(insert OID = 0 ( 1219 tgnargs			21 0  2   11 0 -1 -1 t p f s f f));
530
DATA(insert OID = 0 ( 1219 tgattr			22 0  INDEX_MAX_KEYS*2	12 0 -1 -1 f p f i f f));
531
DATA(insert OID = 0 ( 1219 tgargs			17 0 -1   13 0 -1 -1 f x f i f f));
532 533 534 535 536 537
DATA(insert OID = 0 ( 1219 ctid				27 0  6  -1 0 -1 -1 f p f i f f));
DATA(insert OID = 0 ( 1219 oid				26 0  4  -2 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1219 xmin				28 0  4  -3 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1219 cmin				29 0  4  -4 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1219 xmax				28 0  4  -5 0 -1 -1 t p f i f f));
DATA(insert OID = 0 ( 1219 cmax				29 0  4  -6 0 -1 -1 t p f i f f));
538
DATA(insert OID = 0 ( 1219 tableoid			26 0  4  -7 0 -1 -1 t p f i f f));
539

540
/* ----------------
541 542 543
 *		pg_variable - this relation is modified by special purpose access
 *				  method code.	The following is garbage but is needed
 *				  so that the reldesc code works properly.
544 545 546
 * ----------------
 */
#define Schema_pg_variable \
547
{ 1264, {"varfoo"},  26, 0, 4, 1, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }
548

549
DATA(insert OID = 0 ( 1264 varfoo			26 0  4   1 0 -1 -1 t p f i f f));
550

551
/* ----------------
552 553 554
 *		pg_log - this relation is modified by special purpose access
 *				  method code.	The following is garbage but is needed
 *				  so that the reldesc code works properly.
555 556 557
 * ----------------
 */
#define Schema_pg_log \
558
{ 1269, {"logfoo"},  26, 0, 4, 1, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }
559

560
DATA(insert OID = 0 ( 1269 logfoo			26 0  4   1 0 -1 -1 t p f i f f));
561

562 563 564 565 566 567 568
/* ----------------
 *		pg_xactlock - this relation is modified by special purpose access
 *				  method code.	The following is garbage but is needed
 *				  so that the reldesc code works properly.
 * ----------------
 */
#define Schema_pg_xactlock \
569
{ 376, {"xactlockfoo"},  26, 0, 4, 1, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }
570

571
DATA(insert OID = 0 ( 376 xactlockfoo		26 0  4   1 0 -1 -1 t p f i f f));
572

573
#endif	 /* PG_ATTRIBUTE_H */