]> granicus.if.org Git - postgresql/blob - src/include/catalog/pg_attribute.h
Add new datlastsysoid to pg_database.
[postgresql] / src / include / catalog / pg_attribute.h
1 /*-------------------------------------------------------------------------
2  *
3  * pg_attribute.h
4  *        definition of the system "attribute" relation (pg_attribute)
5  *        along with the relation's initial contents.
6  *
7  *
8  * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
9  * Portions Copyright (c) 1994, Regents of the University of California
10  *
11  * $Id: pg_attribute.h,v 1.66 2000/10/22 17:55:49 pjw Exp $
12  *
13  * NOTES
14  *        the genbki.sh script reads this file and generates .bki
15  *        information from the DATA() statements.
16  *
17  *        utils/cache/relcache.c requires some hard-coded tuple descriptors
18  *        for some of the system catalogs so if the schema for any of
19  *        these changes, be sure and change the appropriate Schema_xxx
20  *        macros!  -cim 2/5/91
21  *
22  *-------------------------------------------------------------------------
23  */
24 #ifndef PG_ATTRIBUTE_H
25 #define PG_ATTRIBUTE_H
26
27 /* ----------------
28  *              postgres.h contains the system type definintions and the
29  *              CATALOG(), BOOTSTRAP and DATA() sugar words so this file
30  *              can be read by both genbki.sh and the C compiler.
31  * ----------------
32  */
33
34 /* ----------------
35  *              pg_attribute definition.  cpp turns this into
36  *              typedef struct FormData_pg_attribute
37  *
38  *              If you change the following, make sure you change the structs for
39  *              system attributes in heap.c and index.c also.
40  * ----------------
41  */
42 CATALOG(pg_attribute) BOOTSTRAP
43 {
44         Oid                     attrelid;               /* OID of relation containing this
45                                                                  * attribute */
46         NameData        attname;
47         Oid                     atttypid;
48
49         /*
50          * atttypid is the OID of the instance in Catalog Class pg_type that
51          * defines the data type of this attribute (e.g. int4).  Information
52          * in that instance is redundant with the attlen, attbyval, and
53          * attalign attributes of this instance, so they had better match or
54          * Postgres will fail.
55          */
56
57         float4          attdispersion;
58
59         /*
60          * attdispersion is the dispersion statistic of the column (0.0 to
61          * 1.0), or zero if the statistic has not been calculated, or -1.0 if
62          * VACUUM found that the column contains no duplicate entries (in
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
65          * number of rows may be updated more often than attdispersion is. We
66          * assume that the column will retain its no-duplicate-entry property.
67          * (Perhaps this should be driven off the existence of a UNIQUE index
68          * 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          * definition.
77          */
78
79         int2            attnum;
80
81         /*
82          * attnum is the "attribute number" for the attribute:  A value that
83          * uniquely identifies this attribute within its class. For user
84          * attributes, Attribute numbers are greater than 0 and not greater
85          * than the number of attributes in the class. I.e. if the Class
86          * pg_class says that Class XYZ has 10 attributes, then the user
87          * attribute numbers in Class pg_attribute must be 1-10.
88          *
89          * System attributes have attribute numbers less than 0 that are unique
90          * within the class, but not constrained to any particular range.
91          *
92          * Note that (attnum - 1) is often used as the index to an array.
93          */
94
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          * indicates no cached value.  But when we copy these tuples into a
103          * tuple descriptor, we may then update attcacheoff in the copies.
104          * This speeds up the attribute walking process.
105          */
106
107         int4            atttypmod;
108
109         /*
110          * atttypmod records type-specific data supplied at table creation
111          * time (for example, the max length of a varchar field).  It is
112          * passed to type-specific input and output functions as the third
113          * argument. The value will generally be -1 for types that do not need
114          * 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          * definition.
123          */
124
125         char            attstorage;
126
127         /*----------
128          * attstorage tells for VARLENA attributes, what the heap access
129          * methods can do to it if a given tuple doesn't fit into a page.
130          * Possible values are
131          *              'p': Value must be stored plain always
132          *              'e': Value can be stored in "secondary" relation (if relation
133          *                       has one, see pg_class.reltoastrelid)
134          *              'm': Value can be stored compressed inline
135          *              'x': Value can be stored compressed inline or in "secondary"
136          * Note that 'm' fields can also be moved out to secondary storage,
137          * but only as a last resort ('e' and 'x' fields are moved first).
138          *----------
139          */
140
141         bool            attisset;
142         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          * definition.
148          */
149
150         bool            attnotnull;
151
152         /* This flag represents the "NOT NULL" constraint */
153         bool            atthasdef;
154
155         /* Has DEFAULT value or not */
156 } FormData_pg_attribute;
157
158 /*
159  * someone should figure out how to do this properly. (The problem is
160  * the size of the C struct is not the same as the size of the tuple.)
161  */
162 #define ATTRIBUTE_TUPLE_SIZE \
163         (offsetof(FormData_pg_attribute,atthasdef) + sizeof(char))
164
165 /* ----------------
166  *              Form_pg_attribute corresponds to a pointer to a tuple with
167  *              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 #define Anum_pg_attribute_attrelid              1
179 #define Anum_pg_attribute_attname               2
180 #define Anum_pg_attribute_atttypid              3
181 #define Anum_pg_attribute_attdispersion 4
182 #define Anum_pg_attribute_attlen                5
183 #define Anum_pg_attribute_attnum                6
184 #define Anum_pg_attribute_attnelems             7
185 #define Anum_pg_attribute_attcacheoff   8
186 #define Anum_pg_attribute_atttypmod             9
187 #define Anum_pg_attribute_attbyval              10
188 #define Anum_pg_attribute_attstorage    11
189 #define Anum_pg_attribute_attisset              12
190 #define Anum_pg_attribute_attalign              13
191 #define Anum_pg_attribute_attnotnull    14
192 #define Anum_pg_attribute_atthasdef             15
193
194
195 #ifdef  _DROP_COLUMN_HACK__
196 /*
197  *      CONSTANT and MACROS for DROP COLUMN implementation
198  */
199 #define DROP_COLUMN_OFFSET      -20
200 #define COLUMN_IS_DROPPED(attribute)    ((attribute)->attnum <= DROP_COLUMN_OFFSET)
201 #define DROPPED_COLUMN_INDEX(attidx)    (DROP_COLUMN_OFFSET - attidx)
202 #define ATTRIBUTE_DROP_COLUMN(attribute) \
203         Assert((attribute)->attnum > 0); \
204         (attribute)->attnum = DROPPED_COLUMN_INDEX((attribute)->attnum); \
205         (attribute)->atttypid = (Oid) -1; \
206         (attribute)->attnotnull = false; \
207         (attribute)->atthasdef = false;
208 #endif   /* _DROP_COLUMN_HACK__ */
209 /* ----------------
210  *              SCHEMA_ macros for declaring hardcoded tuple descriptors.
211  *              these are used in utils/cache/relcache.c
212  * ----------------
213 #define SCHEMA_NAME(x) CppConcat(Name_,x)
214 #define SCHEMA_DESC(x) CppConcat(Desc_,x)
215 #define SCHEMA_NATTS(x) CppConcat(Natts_,x)
216 #define SCHEMA_DEF(x) \
217         FormData_pg_attribute \
218         SCHEMA_DESC(x) [ SCHEMA_NATTS(x) ] = \
219         { \
220                 CppConcat(Schema_,x) \
221         }
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 { 1247, {"typname"},       19, 0, NAMEDATALEN,  1, 0, -1, -1, '\0', 'p', '\0', 'i', '\0', '\0' }, \
235 { 1247, {"typowner"},      23, 0,       4,      2, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
236 { 1247, {"typlen"},                21, 0,       2,      3, 0, -1, -1, '\001', 'p', '\0', 's', '\0', '\0' }, \
237 { 1247, {"typprtlen"},     21, 0,       2,      4, 0, -1, -1, '\001', 'p', '\0', 's', '\0', '\0' }, \
238 { 1247, {"typbyval"},      16, 0,       1,      5, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
239 { 1247, {"typtype"},       18, 0,       1,      6, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
240 { 1247, {"typisdefined"},  16, 0,       1,      7, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
241 { 1247, {"typdelim"},      18, 0,       1,      8, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
242 { 1247, {"typrelid"},      26, 0,       4,      9, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
243 { 1247, {"typelem"},       26, 0,       4, 10, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
244 { 1247, {"typinput"},      24, 0,       4, 11, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
245 { 1247, {"typoutput"},     24, 0,       4, 12, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
246 { 1247, {"typreceive"},    24, 0,       4, 13, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
247 { 1247, {"typsend"},       24, 0,       4, 14, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
248 { 1247, {"typalign"},      18, 0,       1, 15, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
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 DATA(insert OID = 0 ( 1247 typname                      19 0 NAMEDATALEN   1 0 -1 -1 f p f i f f));
253 DATA(insert OID = 0 ( 1247 typowner                     23 0  4   2 0 -1 -1 t p f i f f));
254 DATA(insert OID = 0 ( 1247 typlen                       21 0  2   3 0 -1 -1 t p f s f f));
255 DATA(insert OID = 0 ( 1247 typprtlen            21 0  2   4 0 -1 -1 t p f s f f));
256 DATA(insert OID = 0 ( 1247 typbyval                     16 0  1   5 0 -1 -1 t p f c f f));
257 DATA(insert OID = 0 ( 1247 typtype                      18 0  1   6 0 -1 -1 t p f c f f));
258 DATA(insert OID = 0 ( 1247 typisdefined         16 0  1   7 0 -1 -1 t p f c f f));
259 DATA(insert OID = 0 ( 1247 typdelim                     18 0  1   8 0 -1 -1 t p f c f f));
260 DATA(insert OID = 0 ( 1247 typrelid                     26 0  4   9 0 -1 -1 t p f i f f));
261 DATA(insert OID = 0 ( 1247 typelem                      26 0  4  10 0 -1 -1 t p f i f f));
262 DATA(insert OID = 0 ( 1247 typinput                     24 0  4  11 0 -1 -1 t p f i f f));
263 DATA(insert OID = 0 ( 1247 typoutput            24 0  4  12 0 -1 -1 t p f i f f));
264 DATA(insert OID = 0 ( 1247 typreceive           24 0  4  13 0 -1 -1 t p f i f f));
265 DATA(insert OID = 0 ( 1247 typsend                      24 0  4  14 0 -1 -1 t p f i f f));
266 DATA(insert OID = 0 ( 1247 typalign                     18 0  1  15 0 -1 -1 t p f c f f));
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 DATA(insert OID = 0 ( 1247 ctid                         27 0  6  -1 0 -1 -1 f p f i f f));
270 DATA(insert OID = 0 ( 1247 oid                          26 0  4  -2 0 -1 -1 t p f i f f));
271 DATA(insert OID = 0 ( 1247 xmin                         28 0  4  -3 0 -1 -1 t p f i f f));
272 DATA(insert OID = 0 ( 1247 cmin                         29 0  4  -4 0 -1 -1 t p f i f f));
273 DATA(insert OID = 0 ( 1247 xmax                         28 0  4  -5 0 -1 -1 t p f i f f));
274 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 DATA(insert OID = 0 ( 1262 datname                      19 0 NAMEDATALEN   1 0 -1 -1 f p f i f f));
282 DATA(insert OID = 0 ( 1262 datdba                       23 0  4   2 0 -1 -1 t p f i f f));
283 DATA(insert OID = 0 ( 1262 encoding                     23 0  4   3 0 -1 -1 t p f i f f));
284 DATA(insert OID = 0 ( 1262 datlastsysoid    26 0  4   4 0 -1 -1 t p f i f f));
285 DATA(insert OID = 0 ( 1262 datpath                      25 0 -1   5 0 -1 -1 f x f i f f));
286 DATA(insert OID = 0 ( 1262 ctid                         27 0  6  -1 0 -1 -1 f p f i f f));
287 DATA(insert OID = 0 ( 1262 oid                          26 0  4  -2 0 -1 -1 t p f i f f));
288 DATA(insert OID = 0 ( 1262 xmin                         28 0  4  -3 0 -1 -1 t p f i f f));
289 DATA(insert OID = 0 ( 1262 cmin                         29 0  4  -4 0 -1 -1 t p f i f f));
290 DATA(insert OID = 0 ( 1262 xmax                         28 0  4  -5 0 -1 -1 t p f i f f));
291 DATA(insert OID = 0 ( 1262 cmax                         29 0  4  -6 0 -1 -1 t p f i f f));
292 DATA(insert OID = 0 ( 1262 tableoid                     26 0  4  -7 0 -1 -1 t p f i f f));
293
294 /* ----------------
295  *              pg_proc
296  * ----------------
297  */
298 #define Schema_pg_proc \
299 { 1255, {"proname"},                    19, 0, NAMEDATALEN,  1, 0, -1, -1, '\0', 'p', '\0', 'i', '\0', '\0' }, \
300 { 1255, {"proowner"},                   23, 0,  4,      2, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
301 { 1255, {"prolang"},                    26, 0,  4,      3, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
302 { 1255, {"proisinh"},                   16, 0,  1,      4, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
303 { 1255, {"proistrusted"},               16, 0,  1,      5, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
304 { 1255, {"proiscachable"},              16, 0,  1,      6, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
305 { 1255, {"proisstrict"},                16, 0,  1,      7, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
306 { 1255, {"pronargs"},                   21, 0,  2,      8, 0, -1, -1, '\001', 'p', '\0', 's', '\0', '\0' }, \
307 { 1255, {"proretset"},                  16, 0,  1,      9, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
308 { 1255, {"prorettype"},                 26, 0,  4, 10, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
309 { 1255, {"proargtypes"},                30, 0, INDEX_MAX_KEYS*4, 11, 0, -1, -1, '\0', 'p', '\0', 'i', '\0', '\0' }, \
310 { 1255, {"probyte_pct"},                23, 0,  4, 12, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
311 { 1255, {"properbyte_cpu"},             23, 0,  4, 13, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
312 { 1255, {"propercall_cpu"},             23, 0,  4, 14, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
313 { 1255, {"prooutin_ratio"},             23, 0,  4, 15, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
314 { 1255, {"prosrc"},                             25, 0, -1, 16, 0, -1, -1, '\0', 'x', '\0', 'i', '\0', '\0' }, \
315 { 1255, {"probin"},                             17, 0, -1, 17, 0, -1, -1, '\0', 'x', '\0', 'i', '\0', '\0' }
316
317 DATA(insert OID = 0 ( 1255 proname                      19 0 NAMEDATALEN   1 0 -1 -1 f p f i f f));
318 DATA(insert OID = 0 ( 1255 proowner                     23 0  4   2 0 -1 -1 t p f i f f));
319 DATA(insert OID = 0 ( 1255 prolang                      26 0  4   3 0 -1 -1 t p f i f f));
320 DATA(insert OID = 0 ( 1255 proisinh                     16 0  1   4 0 -1 -1 t p f c f f));
321 DATA(insert OID = 0 ( 1255 proistrusted         16 0  1   5 0 -1 -1 t p f c f f));
322 DATA(insert OID = 0 ( 1255 proiscachable        16 0  1   6 0 -1 -1 t p f c f f));
323 DATA(insert OID = 0 ( 1255 proisstrict          16 0  1   7 0 -1 -1 t p f c f f));
324 DATA(insert OID = 0 ( 1255 pronargs                     21 0  2   8 0 -1 -1 t p f s f f));
325 DATA(insert OID = 0 ( 1255 proretset            16 0  1   9 0 -1 -1 t p f c f f));
326 DATA(insert OID = 0 ( 1255 prorettype           26 0  4  10 0 -1 -1 t p f i f f));
327 DATA(insert OID = 0 ( 1255 proargtypes          30 0 INDEX_MAX_KEYS*4 11 0 -1 -1 f p f i f f));
328 DATA(insert OID = 0 ( 1255 probyte_pct          23 0  4  12 0 -1 -1 t p f i f f));
329 DATA(insert OID = 0 ( 1255 properbyte_cpu       23 0  4  13 0 -1 -1 t p f i f f));
330 DATA(insert OID = 0 ( 1255 propercall_cpu       23 0  4  14 0 -1 -1 t p f i f f));
331 DATA(insert OID = 0 ( 1255 prooutin_ratio       23 0  4  15 0 -1 -1 t p f i f f));
332 DATA(insert OID = 0 ( 1255 prosrc                       25 0 -1  16 0 -1 -1 f x f i f f));
333 DATA(insert OID = 0 ( 1255 probin                       17 0 -1  17 0 -1 -1 f x f i f f));
334 DATA(insert OID = 0 ( 1255 ctid                         27 0  6  -1 0 -1 -1 f p f i f f));
335 DATA(insert OID = 0 ( 1255 oid                          26 0  4  -2 0 -1 -1 t p f i f f));
336 DATA(insert OID = 0 ( 1255 xmin                         28 0  4  -3 0 -1 -1 t p f i f f));
337 DATA(insert OID = 0 ( 1255 cmin                         29 0  4  -4 0 -1 -1 t p f i f f));
338 DATA(insert OID = 0 ( 1255 xmax                         28 0  4  -5 0 -1 -1 t p f i f f));
339 DATA(insert OID = 0 ( 1255 cmax                         29 0  4  -6 0 -1 -1 t p f i f f));
340 DATA(insert OID = 0 ( 1255 tableoid                     26 0  4  -7 0 -1 -1 t p f i f f));
341
342 /* ----------------
343  *              pg_shadow
344  * ----------------
345  */
346 DATA(insert OID = 0 ( 1260 usename                      19      0 NAMEDATALEN   1 0 -1 -1 f p f i f f));
347 DATA(insert OID = 0 ( 1260 usesysid                     23      0       4       2 0 -1 -1 t p f i f f));
348 DATA(insert OID = 0 ( 1260 usecreatedb          16      0       1       3 0 -1 -1 t p f c f f));
349 DATA(insert OID = 0 ( 1260 usetrace                     16      0       1       4 0 -1 -1 t p f c f f));
350 DATA(insert OID = 0 ( 1260 usesuper                     16      0       1       5 0 -1 -1 t p f c f f));
351 DATA(insert OID = 0 ( 1260 usecatupd            16      0       1       6 0 -1 -1 t p f c f f));
352 DATA(insert OID = 0 ( 1260 passwd                       25      0  -1   7 0 -1 -1 f x f i f f));
353 DATA(insert OID = 0 ( 1260 valuntil                     702 0   4       8 0 -1 -1 t p f i f f));
354 DATA(insert OID = 0 ( 1260 ctid                         27 0  6  -1 0 -1 -1 f p f i f f));
355 DATA(insert OID = 0 ( 1260 oid                          26 0  4  -2 0 -1 -1 t p f i f f));
356 DATA(insert OID = 0 ( 1260 xmin                         28 0  4  -3 0 -1 -1 t p f i f f));
357 DATA(insert OID = 0 ( 1260 cmin                         29 0  4  -4 0 -1 -1 t p f i f f));
358 DATA(insert OID = 0 ( 1260 xmax                         28 0  4  -5 0 -1 -1 t p f i f f));
359 DATA(insert OID = 0 ( 1260 cmax                         29 0  4  -6 0 -1 -1 t p f i f f));
360 DATA(insert OID = 0 ( 1260 tableoid                     26 0  4  -7 0 -1 -1 t p f i f f));
361
362 /* ----------------
363  *              pg_group
364  * ----------------
365  */
366 DATA(insert OID = 0 ( 1261 groname                      19 0 NAMEDATALEN  1 0 -1 -1 f p f i f f));
367 DATA(insert OID = 0 ( 1261 grosysid                     23 0  4   2 0 -1 -1 t p f i f f));
368 DATA(insert OID = 0 ( 1261 grolist                1007 0 -1   3 0 -1 -1 f x f i f f));
369 DATA(insert OID = 0 ( 1261 ctid                         27 0  6  -1 0 -1 -1 f p f i f f));
370 DATA(insert OID = 0 ( 1261 oid                          26 0  4  -2 0 -1 -1 t p f i f f));
371 DATA(insert OID = 0 ( 1261 xmin                         28 0  4  -3 0 -1 -1 t p f i f f));
372 DATA(insert OID = 0 ( 1261 cmin                         29 0  4  -4 0 -1 -1 t p f i f f));
373 DATA(insert OID = 0 ( 1261 xmax                         28 0  4  -5 0 -1 -1 t p f i f f));
374 DATA(insert OID = 0 ( 1261 cmax                         29 0  4  -6 0 -1 -1 t p f i f f));
375 DATA(insert OID = 0 ( 1261 tableoid                     26 0  4  -7 0 -1 -1 t p f i f f));
376
377 /* ----------------
378  *              pg_attribute
379  * ----------------
380  */
381 #define Schema_pg_attribute \
382 { 1249, {"attrelid"},     26, 0,        4,      1, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
383 { 1249, {"attname"},      19, 0, NAMEDATALEN,   2, 0, -1, -1, '\0', 'p', '\0', 'i', '\0', '\0' }, \
384 { 1249, {"atttypid"},     26, 0,        4,      3, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
385 { 1249, {"attdispersion"}, 700, 0,      4,      4, 0, -1, -1, '\0', 'p', '\0', 'i', '\0', '\0' }, \
386 { 1249, {"attlen"},               21, 0,        2,      5, 0, -1, -1, '\001', 'p', '\0', 's', '\0', '\0' }, \
387 { 1249, {"attnum"},               21, 0,        2,      6, 0, -1, -1, '\001', 'p', '\0', 's', '\0', '\0' }, \
388 { 1249, {"attnelems"},    23, 0,        4,      7, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
389 { 1249, {"attcacheoff"},  23, 0,        4,      8, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
390 { 1249, {"atttypmod"},    23, 0,        4,      9, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
391 { 1249, {"attbyval"},     16, 0,        1, 10, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
392 { 1249, {"attstorage"},   18, 0,        1, 11, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
393 { 1249, {"attisset"},     16, 0,        1, 12, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
394 { 1249, {"attalign"},     18, 0,        1, 13, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
395 { 1249, {"attnotnull"},  16, 0, 1, 14, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
396 { 1249, {"atthasdef"},   16, 0, 1, 15, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }
397
398 DATA(insert OID = 0 ( 1249 attrelid                     26 0  4   1 0 -1 -1 t p f i f f));
399 DATA(insert OID = 0 ( 1249 attname                      19 0 NAMEDATALEN  2 0 -1 -1 f p f i f f));
400 DATA(insert OID = 0 ( 1249 atttypid                     26 0  4   3 0 -1 -1 t p f i f f));
401 DATA(insert OID = 0 ( 1249 attdispersion   700 0  4   4 0 -1 -1 f p f i f f));
402 DATA(insert OID = 0 ( 1249 attlen                       21 0  2   5 0 -1 -1 t p f s f f));
403 DATA(insert OID = 0 ( 1249 attnum                       21 0  2   6 0 -1 -1 t p f s f f));
404 DATA(insert OID = 0 ( 1249 attnelems            23 0  4   7 0 -1 -1 t p f i f f));
405 DATA(insert OID = 0 ( 1249 attcacheoff          23 0  4   8 0 -1 -1 t p f i f f));
406 DATA(insert OID = 0 ( 1249 atttypmod            23 0  4   9 0 -1 -1 t p f i f f));
407 DATA(insert OID = 0 ( 1249 attbyval                     16 0  1  10 0 -1 -1 t p f c f f));
408 DATA(insert OID = 0 ( 1249 attstorage           18 0  1  11 0 -1 -1 t p f c f f));
409 DATA(insert OID = 0 ( 1249 attisset                     16 0  1  12 0 -1 -1 t p f c f f));
410 DATA(insert OID = 0 ( 1249 attalign                     18 0  1  13 0 -1 -1 t p f c f f));
411 DATA(insert OID = 0 ( 1249 attnotnull           16 0  1  14 0 -1 -1 t p f c f f));
412 DATA(insert OID = 0 ( 1249 atthasdef            16 0  1  15 0 -1 -1 t p f c f f));
413 DATA(insert OID = 0 ( 1249 ctid                         27 0  6  -1 0 -1 -1 f p f i f f));
414 DATA(insert OID = 0 ( 1249 oid                          26 0  4  -2 0 -1 -1 t p f i f f));
415 DATA(insert OID = 0 ( 1249 xmin                         28 0  4  -3 0 -1 -1 t p f i f f));
416 DATA(insert OID = 0 ( 1249 cmin                         29 0  4  -4 0 -1 -1 t p f i f f));
417 DATA(insert OID = 0 ( 1249 xmax                         28 0  4  -5 0 -1 -1 t p f i f f));
418 DATA(insert OID = 0 ( 1249 cmax                         29 0  4  -6 0 -1 -1 t p f i f f));
419 DATA(insert OID = 0 ( 1249 tableoid                     26 0  4  -7 0 -1 -1 t p f i f f));
420
421 /* ----------------
422  *              pg_class
423  * ----------------
424  */
425 #define Schema_pg_class \
426 { 1259, {"relname"},       19, 0, NAMEDATALEN,  1, 0, -1, -1, '\0', 'p', '\0', 'i', '\0', '\0' }, \
427 { 1259, {"reltype"},       26, 0,       4,      2, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
428 { 1259, {"relowner"},      23, 0,       4,      3, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
429 { 1259, {"relam"},                 26, 0,       4,      4, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
430 { 1259, {"relfilenode"},   26, 0,       4,      5, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
431 { 1259, {"relpages"},      23, 0,       4,      6, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
432 { 1259, {"reltuples"},     23, 0,       4,      7, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
433 { 1259, {"reltoastrelid"}, 26, 0,       4,      8, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
434 { 1259, {"reltoastidxid"}, 26, 0,       4,      9, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }, \
435 { 1259, {"relhasindex"},   16, 0,       1, 10, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
436 { 1259, {"relisshared"},   16, 0,       1, 11, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
437 { 1259, {"relkind"},       18, 0,       1, 12, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
438 { 1259, {"relnatts"},      21, 0,       2, 13, 0, -1, -1, '\001', 'p', '\0', 's', '\0', '\0' }, \
439 { 1259, {"relchecks"},     21, 0,       2, 14, 0, -1, -1, '\001', 'p', '\0', 's', '\0', '\0' }, \
440 { 1259, {"reltriggers"},   21, 0,       2, 15, 0, -1, -1, '\001', 'p', '\0', 's', '\0', '\0' }, \
441 { 1259, {"relukeys"},      21, 0,       2, 16, 0, -1, -1, '\001', 'p', '\0', 's', '\0', '\0' }, \
442 { 1259, {"relfkeys"},      21, 0,       2, 17, 0, -1, -1, '\001', 'p', '\0', 's', '\0', '\0' }, \
443 { 1259, {"relrefs"},       21, 0,       2, 18, 0, -1, -1, '\001', 'p', '\0', 's', '\0', '\0' }, \
444 { 1259, {"relhaspkey"},    16, 0,       1, 19, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
445 { 1259, {"relhasrules"},   16, 0,       1, 20, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
446 { 1259, {"relhassubclass"},16, 0,       1, 21, 0, -1, -1, '\001', 'p', '\0', 'c', '\0', '\0' }, \
447 { 1259, {"relacl"},              1034, 0,  -1, 22, 0, -1, -1,   '\0', 'x', '\0', 'i', '\0', '\0' }
448
449 DATA(insert OID = 0 ( 1259 relname                      19 0 NAMEDATALEN   1 0 -1 -1 f p f i f f));
450 DATA(insert OID = 0 ( 1259 reltype                      26 0  4   2 0 -1 -1 t p f i f f));
451 DATA(insert OID = 0 ( 1259 relowner                     23 0  4   3 0 -1 -1 t p f i f f));
452 DATA(insert OID = 0 ( 1259 relam                        26 0  4   4 0 -1 -1 t p f i f f));
453 DATA(insert OID = 0 ( 1259 relfilenode          26 0  4   5 0 -1 -1 t p f i f f));
454 DATA(insert OID = 0 ( 1259 relpages                     23 0  4   6 0 -1 -1 t p f i f f));
455 DATA(insert OID = 0 ( 1259 reltuples            23 0  4   7 0 -1 -1 t p f i f f));
456 DATA(insert OID = 0 ( 1259 reltoastrelid        26 0  4   8 0 -1 -1 t p f i f f));
457 DATA(insert OID = 0 ( 1259 reltoastidxid        26 0  4   9 0 -1 -1 t p f i f f));
458 DATA(insert OID = 0 ( 1259 relhasindex          16 0  1  10 0 -1 -1 t p f c f f));
459 DATA(insert OID = 0 ( 1259 relisshared          16 0  1  11 0 -1 -1 t p f c f f));
460 DATA(insert OID = 0 ( 1259 relkind                      18 0  1  12 0 -1 -1 t p f c f f));
461 DATA(insert OID = 0 ( 1259 relnatts                     21 0  2  13 0 -1 -1 t p f s f f));
462 DATA(insert OID = 0 ( 1259 relchecks            21 0  2  14 0 -1 -1 t p f s f f));
463 DATA(insert OID = 0 ( 1259 reltriggers          21 0  2  15 0 -1 -1 t p f s f f));
464 DATA(insert OID = 0 ( 1259 relukeys                     21 0  2  16 0 -1 -1 t p f s f f));
465 DATA(insert OID = 0 ( 1259 relfkeys                     21 0  2  17 0 -1 -1 t p f s f f));
466 DATA(insert OID = 0 ( 1259 relrefs                      21 0  2  18 0 -1 -1 t p f s f f));
467 DATA(insert OID = 0 ( 1259 relhaspkey           16 0  1  19 0 -1 -1 t p f c f f));
468 DATA(insert OID = 0 ( 1259 relhasrules          16 0  1  20 0 -1 -1 t p f c f f));
469 DATA(insert OID = 0 ( 1259 relhassubclass       16 0  1  21 0 -1 -1 t p f c f f));
470 DATA(insert OID = 0 ( 1259 relacl                 1034 0 -1  22 0 -1 -1 f x f i f f));
471 DATA(insert OID = 0 ( 1259 ctid                         27 0  6  -1 0 -1 -1 f p f i f f));
472 DATA(insert OID = 0 ( 1259 oid                          26 0  4  -2 0 -1 -1 t p f i f f));
473 DATA(insert OID = 0 ( 1259 xmin                         28 0  4  -3 0 -1 -1 t p f i f f));
474 DATA(insert OID = 0 ( 1259 cmin                         29 0  4  -4 0 -1 -1 t p f i f f));
475 DATA(insert OID = 0 ( 1259 xmax                         28 0  4  -5 0 -1 -1 t p f i f f));
476 DATA(insert OID = 0 ( 1259 cmax                         29 0  4  -6 0 -1 -1 t p f i f f));
477 DATA(insert OID = 0 ( 1259 tableoid                     26 0  4  -7 0 -1 -1 t p f i f f));
478
479 /* ----------------
480  *              pg_attrdef
481  * ----------------
482  */
483 DATA(insert OID = 0 ( 1215 adrelid                      26 0  4   1 0 -1 -1 t p f i f f));
484 DATA(insert OID = 0 ( 1215 adnum                        21 0  2   2 0 -1 -1 t p f s f f));
485 DATA(insert OID = 0 ( 1215 adbin                        25 0 -1   3 0 -1 -1 f x f i f f));
486 DATA(insert OID = 0 ( 1215 adsrc                        25 0 -1   4 0 -1 -1 f x f i f f));
487 DATA(insert OID = 0 ( 1215 ctid                         27 0  6  -1 0 -1 -1 f p f i f f));
488 DATA(insert OID = 0 ( 1215 oid                          26 0  4  -2 0 -1 -1 t p f i f f));
489 DATA(insert OID = 0 ( 1215 xmin                         28 0  4  -3 0 -1 -1 t p f i f f));
490 DATA(insert OID = 0 ( 1215 cmin                         29 0  4  -4 0 -1 -1 t p f i f f));
491 DATA(insert OID = 0 ( 1215 xmax                         28 0  4  -5 0 -1 -1 t p f i f f));
492 DATA(insert OID = 0 ( 1215 cmax                         29 0  4  -6 0 -1 -1 t p f i f f));
493 DATA(insert OID = 0 ( 1215 tableoid                     26 0  4  -7 0 -1 -1 t p f i f f));
494
495 /* ----------------
496  *              pg_relcheck
497  * ----------------
498  */
499 DATA(insert OID = 0 ( 1216 rcrelid                      26 0  4   1 0 -1 -1 t p f i f f));
500 DATA(insert OID = 0 ( 1216 rcname                       19 0  NAMEDATALEN  2 0 -1 -1 f p f i f f));
501 DATA(insert OID = 0 ( 1216 rcbin                        25 0 -1   3 0 -1 -1 f x f i f f));
502 DATA(insert OID = 0 ( 1216 rcsrc                        25 0 -1   4 0 -1 -1 f x f i f f));
503 DATA(insert OID = 0 ( 1216 ctid                         27 0  6  -1 0 -1 -1 f p f i f f));
504 DATA(insert OID = 0 ( 1216 oid                          26 0  4  -2 0 -1 -1 t p f i f f));
505 DATA(insert OID = 0 ( 1216 xmin                         28 0  4  -3 0 -1 -1 t p f i f f));
506 DATA(insert OID = 0 ( 1216 cmin                         29 0  4  -4 0 -1 -1 t p f i f f));
507 DATA(insert OID = 0 ( 1216 xmax                         28 0  4  -5 0 -1 -1 t p f i f f));
508 DATA(insert OID = 0 ( 1216 cmax                         29 0  4  -6 0 -1 -1 t p f i f f));
509 DATA(insert OID = 0 ( 1216 tableoid                     26 0  4  -7 0 -1 -1 t p f i f f));
510
511 /* ----------------
512  *              pg_trigger
513  * ----------------
514  */
515 DATA(insert OID = 0 ( 1219 tgrelid                      26 0  4   1 0 -1 -1 t p f i f f));
516 DATA(insert OID = 0 ( 1219 tgname                       19 0  NAMEDATALEN  2 0 -1 -1 f p f i f f));
517 DATA(insert OID = 0 ( 1219 tgfoid                       26 0  4   3 0 -1 -1 t p f i f f));
518 DATA(insert OID = 0 ( 1219 tgtype                       21 0  2   4 0 -1 -1 t p f s f f));
519 DATA(insert OID = 0 ( 1219 tgenabled            16 0  1   5 0 -1 -1 t p f c f f));
520 DATA(insert OID = 0 ( 1219 tgisconstraint       16 0  1   6 0 -1 -1 t p f c f f));
521 DATA(insert OID = 0 ( 1219 tgconstrname         19 0  NAMEDATALEN  7 0 -1 -1 f p f i f f));
522 DATA(insert OID = 0 ( 1219 tgconstrrelid        26 0  4   8 0 -1 -1 t p f i f f));
523
524 DATA(insert OID = 0 ( 1219 tgdeferrable         16 0  1   9 0 -1 -1 t p f c f f));
525 DATA(insert OID = 0 ( 1219 tginitdeferred       16 0  1   10 0 -1 -1 t p f c f f));
526 DATA(insert OID = 0 ( 1219 tgnargs                      21 0  2   11 0 -1 -1 t p f s f f));
527 DATA(insert OID = 0 ( 1219 tgattr                       22 0  INDEX_MAX_KEYS*2  12 0 -1 -1 f p f i f f));
528 DATA(insert OID = 0 ( 1219 tgargs                       17 0 -1   13 0 -1 -1 f x f i f f));
529 DATA(insert OID = 0 ( 1219 ctid                         27 0  6  -1 0 -1 -1 f p f i f f));
530 DATA(insert OID = 0 ( 1219 oid                          26 0  4  -2 0 -1 -1 t p f i f f));
531 DATA(insert OID = 0 ( 1219 xmin                         28 0  4  -3 0 -1 -1 t p f i f f));
532 DATA(insert OID = 0 ( 1219 cmin                         29 0  4  -4 0 -1 -1 t p f i f f));
533 DATA(insert OID = 0 ( 1219 xmax                         28 0  4  -5 0 -1 -1 t p f i f f));
534 DATA(insert OID = 0 ( 1219 cmax                         29 0  4  -6 0 -1 -1 t p f i f f));
535 DATA(insert OID = 0 ( 1219 tableoid                     26 0  4  -7 0 -1 -1 t p f i f f));
536
537 /* ----------------
538  *              pg_variable - this relation is modified by special purpose access
539  *                                method code.  The following is garbage but is needed
540  *                                so that the reldesc code works properly.
541  * ----------------
542  */
543 #define Schema_pg_variable \
544 { 1264, {"varfoo"},  26, 0, 4, 1, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }
545
546 DATA(insert OID = 0 ( 1264 varfoo                       26 0  4   1 0 -1 -1 t p f i f f));
547
548 /* ----------------
549  *              pg_log - this relation is modified by special purpose access
550  *                                method code.  The following is garbage but is needed
551  *                                so that the reldesc code works properly.
552  * ----------------
553  */
554 #define Schema_pg_log \
555 { 1269, {"logfoo"},  26, 0, 4, 1, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }
556
557 DATA(insert OID = 0 ( 1269 logfoo                       26 0  4   1 0 -1 -1 t p f i f f));
558
559 /* ----------------
560  *              pg_xactlock - this relation is modified by special purpose access
561  *                                method code.  The following is garbage but is needed
562  *                                so that the reldesc code works properly.
563  * ----------------
564  */
565 #define Schema_pg_xactlock \
566 { 376, {"xactlockfoo"},  26, 0, 4, 1, 0, -1, -1, '\001', 'p', '\0', 'i', '\0', '\0' }
567
568 DATA(insert OID = 0 ( 376 xactlockfoo           26 0  4   1 0 -1 -1 t p f i f f));
569
570 #endif   /* PG_ATTRIBUTE_H */