~vcs-imports/mammoth-replicator/trunk

« back to all changes in this revision

Viewing changes to src/include/catalog/pg_attribute.h

  • Committer: alvherre
  • Date: 2005-12-16 21:24:52 UTC
  • Revision ID: svn-v4:db760fc0-0f08-0410-9d63-cc6633f64896:trunk:1
Initial import of the REL8_0_3 sources from the Pgsql CVS repository.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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-2005, PostgreSQL Global Development Group
 
9
 * Portions Copyright (c) 1994, Regents of the University of California
 
10
 *
 
11
 * $PostgreSQL: pgsql/src/include/catalog/pg_attribute.h,v 1.113 2004-12-31 22:03:24 pgsql 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 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 definitions 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 catalog/heap.c also.
 
40
 * ----------------
 
41
 */
 
42
CATALOG(pg_attribute) BOOTSTRAP BKI_WITHOUT_OIDS
 
43
{
 
44
        Oid                     attrelid;               /* OID of relation containing this
 
45
                                                                 * attribute */
 
46
        NameData        attname;                /* name of attribute */
 
47
 
 
48
        /*
 
49
         * atttypid is the OID of the instance in Catalog Class pg_type that
 
50
         * defines the data type of this attribute (e.g. int4).  Information
 
51
         * in that instance is redundant with the attlen, attbyval, and
 
52
         * attalign attributes of this instance, so they had better match or
 
53
         * Postgres will fail.
 
54
         */
 
55
        Oid                     atttypid;
 
56
 
 
57
        /*
 
58
         * attstattarget is the target number of statistics datapoints to
 
59
         * collect during VACUUM ANALYZE of this column.  A zero here
 
60
         * indicates that we do not wish to collect any stats about this
 
61
         * column. A "-1" here indicates that no value has been explicitly set
 
62
         * for this column, so ANALYZE should use the default setting.
 
63
         */
 
64
        int4            attstattarget;
 
65
 
 
66
        /*
 
67
         * attlen is a copy of the typlen field from pg_type for this
 
68
         * attribute.  See atttypid comments above.
 
69
         */
 
70
        int2            attlen;
 
71
 
 
72
        /*
 
73
         * attnum is the "attribute number" for the attribute:  A value that
 
74
         * uniquely identifies this attribute within its class. For user
 
75
         * attributes, Attribute numbers are greater than 0 and not greater
 
76
         * than the number of attributes in the class. I.e. if the Class
 
77
         * pg_class says that Class XYZ has 10 attributes, then the user
 
78
         * attribute numbers in Class pg_attribute must be 1-10.
 
79
         *
 
80
         * System attributes have attribute numbers less than 0 that are unique
 
81
         * within the class, but not constrained to any particular range.
 
82
         *
 
83
         * Note that (attnum - 1) is often used as the index to an array.
 
84
         */
 
85
        int2            attnum;
 
86
 
 
87
        /*
 
88
         * attndims is the declared number of dimensions, if an array type,
 
89
         * otherwise zero.
 
90
         */
 
91
        int4            attndims;
 
92
 
 
93
        /*
 
94
         * fastgetattr() uses attcacheoff to cache byte offsets of attributes
 
95
         * in heap tuples.      The value actually stored in pg_attribute (-1)
 
96
         * indicates no cached value.  But when we copy these tuples into a
 
97
         * tuple descriptor, we may then update attcacheoff in the copies.
 
98
         * This speeds up the attribute walking process.
 
99
         */
 
100
        int4            attcacheoff;
 
101
 
 
102
        /*
 
103
         * atttypmod records type-specific data supplied at table creation
 
104
         * time (for example, the max length of a varchar field).  It is
 
105
         * passed to type-specific input and output functions as the third
 
106
         * argument. The value will generally be -1 for types that do not need
 
107
         * typmod.
 
108
         */
 
109
        int4            atttypmod;
 
110
 
 
111
        /*
 
112
         * attbyval is a copy of the typbyval field from pg_type for this
 
113
         * attribute.  See atttypid comments above.
 
114
         */
 
115
        bool            attbyval;
 
116
 
 
117
        /*----------
 
118
         * attstorage tells for VARLENA attributes, what the heap access
 
119
         * methods can do to it if a given tuple doesn't fit into a page.
 
120
         * Possible values are
 
121
         *              'p': Value must be stored plain always
 
122
         *              'e': Value can be stored in "secondary" relation (if relation
 
123
         *                       has one, see pg_class.reltoastrelid)
 
124
         *              'm': Value can be stored compressed inline
 
125
         *              'x': Value can be stored compressed inline or in "secondary"
 
126
         * Note that 'm' fields can also be moved out to secondary storage,
 
127
         * but only as a last resort ('e' and 'x' fields are moved first).
 
128
         *----------
 
129
         */
 
130
        char            attstorage;
 
131
 
 
132
        /*
 
133
         * attalign is a copy of the typalign field from pg_type for this
 
134
         * attribute.  See atttypid comments above.
 
135
         */
 
136
        char            attalign;
 
137
 
 
138
        /* This flag represents the "NOT NULL" constraint */
 
139
        bool            attnotnull;
 
140
 
 
141
        /* Has DEFAULT value or not */
 
142
        bool            atthasdef;
 
143
 
 
144
        /* Is dropped (ie, logically invisible) or not */
 
145
        bool            attisdropped;
 
146
 
 
147
        /* Has a local definition (hence, do not drop when attinhcount is 0) */
 
148
        bool            attislocal;
 
149
 
 
150
        /* Number of times inherited from direct parent relation(s) */
 
151
        int4            attinhcount;
 
152
} FormData_pg_attribute;
 
153
 
 
154
/*
 
155
 * someone should figure out how to do this properly. (The problem is
 
156
 * the size of the C struct is not the same as the size of the tuple
 
157
 * because of alignment padding at the end of the struct.)
 
158
 */
 
159
#define ATTRIBUTE_TUPLE_SIZE \
 
160
        (offsetof(FormData_pg_attribute,attinhcount) + sizeof(int4))
 
161
 
 
162
/* ----------------
 
163
 *              Form_pg_attribute corresponds to a pointer to a tuple with
 
164
 *              the format of pg_attribute relation.
 
165
 * ----------------
 
166
 */
 
167
typedef FormData_pg_attribute *Form_pg_attribute;
 
168
 
 
169
/* ----------------
 
170
 *              compiler constants for pg_attribute
 
171
 * ----------------
 
172
 */
 
173
 
 
174
#define Natts_pg_attribute                              17
 
175
#define Anum_pg_attribute_attrelid              1
 
176
#define Anum_pg_attribute_attname               2
 
177
#define Anum_pg_attribute_atttypid              3
 
178
#define Anum_pg_attribute_attstattarget 4
 
179
#define Anum_pg_attribute_attlen                5
 
180
#define Anum_pg_attribute_attnum                6
 
181
#define Anum_pg_attribute_attndims              7
 
182
#define Anum_pg_attribute_attcacheoff   8
 
183
#define Anum_pg_attribute_atttypmod             9
 
184
#define Anum_pg_attribute_attbyval              10
 
185
#define Anum_pg_attribute_attstorage    11
 
186
#define Anum_pg_attribute_attalign              12
 
187
#define Anum_pg_attribute_attnotnull    13
 
188
#define Anum_pg_attribute_atthasdef             14
 
189
#define Anum_pg_attribute_attisdropped  15
 
190
#define Anum_pg_attribute_attislocal    16
 
191
#define Anum_pg_attribute_attinhcount   17
 
192
 
 
193
 
 
194
 
 
195
/* ----------------
 
196
 *              SCHEMA_ macros for declaring hardcoded tuple descriptors.
 
197
 *              these are used in utils/cache/relcache.c
 
198
 * ----------------
 
199
#define SCHEMA_NAME(x) CppConcat(Name_,x)
 
200
#define SCHEMA_DESC(x) CppConcat(Desc_,x)
 
201
#define SCHEMA_NATTS(x) CppConcat(Natts_,x)
 
202
#define SCHEMA_DEF(x) \
 
203
        FormData_pg_attribute \
 
204
        SCHEMA_DESC(x) [ SCHEMA_NATTS(x) ] = \
 
205
        { \
 
206
                CppConcat(Schema_,x) \
 
207
        }
 
208
 */
 
209
 
 
210
/* ----------------
 
211
 *              initial contents of pg_attribute
 
212
 *
 
213
 * NOTE: only "bootstrapped" relations need to be declared here.
 
214
 *
 
215
 * NOTE: if changing pg_attribute column set, also see the hard-coded
 
216
 * entries for system attributes in catalog/heap.c.
 
217
 * ----------------
 
218
 */
 
219
 
 
220
/* ----------------
 
221
 *              pg_type
 
222
 * ----------------
 
223
 */
 
224
#define Schema_pg_type \
 
225
{ 1247, {"typname"},       19, -1, NAMEDATALEN, 1, 0, -1, -1, false, 'p', 'i', true, false, false, true, 0 }, \
 
226
{ 1247, {"typnamespace"},  26, -1,      4,      2, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
 
227
{ 1247, {"typowner"},      23, -1,      4,      3, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
 
228
{ 1247, {"typlen"},                21, -1,      2,      4, 0, -1, -1, true, 'p', 's', true, false, false, true, 0 }, \
 
229
{ 1247, {"typbyval"},      16, -1,      1,      5, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
 
230
{ 1247, {"typtype"},       18, -1,      1,      6, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
 
231
{ 1247, {"typisdefined"},  16, -1,      1,      7, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
 
232
{ 1247, {"typdelim"},      18, -1,      1,      8, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
 
233
{ 1247, {"typrelid"},      26, -1,      4,      9, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
 
234
{ 1247, {"typelem"},       26, -1,      4, 10, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
 
235
{ 1247, {"typinput"},      24, -1,      4, 11, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
 
236
{ 1247, {"typoutput"},     24, -1,      4, 12, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
 
237
{ 1247, {"typreceive"},    24, -1,      4, 13, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
 
238
{ 1247, {"typsend"},       24, -1,      4, 14, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
 
239
{ 1247, {"typanalyze"},    24, -1,      4, 15, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
 
240
{ 1247, {"typalign"},      18, -1,      1, 16, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
 
241
{ 1247, {"typstorage"},    18, -1,      1, 17, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
 
242
{ 1247, {"typnotnull"},    16, -1,      1, 18, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
 
243
{ 1247, {"typbasetype"},   26, -1,      4, 19, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
 
244
{ 1247, {"typtypmod"},     23, -1,      4, 20, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
 
245
{ 1247, {"typndims"},      23, -1,      4, 21, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
 
246
{ 1247, {"typdefaultbin"}, 25, -1, -1, 22, 0, -1, -1, false, 'x', 'i', false, false, false, true, 0 }, \
 
247
{ 1247, {"typdefault"},    25, -1, -1, 23, 0, -1, -1, false, 'x', 'i', false, false, false, true, 0 }
 
248
 
 
249
 
 
250
DATA(insert ( 1247 typname                      19 -1 NAMEDATALEN       1 0 -1 -1 f p i t f f t 0));
 
251
DATA(insert ( 1247 typnamespace         26 -1 4   2 0 -1 -1 t p i t f f t 0));
 
252
DATA(insert ( 1247 typowner                     23 -1 4   3 0 -1 -1 t p i t f f t 0));
 
253
DATA(insert ( 1247 typlen                       21 -1 2   4 0 -1 -1 t p s t f f t 0));
 
254
DATA(insert ( 1247 typbyval                     16 -1 1   5 0 -1 -1 t p c t f f t 0));
 
255
DATA(insert ( 1247 typtype                      18 -1 1   6 0 -1 -1 t p c t f f t 0));
 
256
DATA(insert ( 1247 typisdefined         16 -1 1   7 0 -1 -1 t p c t f f t 0));
 
257
DATA(insert ( 1247 typdelim                     18 -1 1   8 0 -1 -1 t p c t f f t 0));
 
258
DATA(insert ( 1247 typrelid                     26 -1 4   9 0 -1 -1 t p i t f f t 0));
 
259
DATA(insert ( 1247 typelem                      26 -1 4  10 0 -1 -1 t p i t f f t 0));
 
260
DATA(insert ( 1247 typinput                     24 -1 4  11 0 -1 -1 t p i t f f t 0));
 
261
DATA(insert ( 1247 typoutput            24 -1 4  12 0 -1 -1 t p i t f f t 0));
 
262
DATA(insert ( 1247 typreceive           24 -1 4  13 0 -1 -1 t p i t f f t 0));
 
263
DATA(insert ( 1247 typsend                      24 -1 4  14 0 -1 -1 t p i t f f t 0));
 
264
DATA(insert ( 1247 typanalyze           24 -1 4  15 0 -1 -1 t p i t f f t 0));
 
265
DATA(insert ( 1247 typalign                     18 -1 1  16 0 -1 -1 t p c t f f t 0));
 
266
DATA(insert ( 1247 typstorage           18 -1 1  17 0 -1 -1 t p c t f f t 0));
 
267
DATA(insert ( 1247 typnotnull           16 -1 1  18 0 -1 -1 t p c t f f t 0));
 
268
DATA(insert ( 1247 typbasetype          26 -1 4  19 0 -1 -1 t p i t f f t 0));
 
269
DATA(insert ( 1247 typtypmod            23 -1 4  20 0 -1 -1 t p i t f f t 0));
 
270
DATA(insert ( 1247 typndims                     23 -1 4  21 0 -1 -1 t p i t f f t 0));
 
271
DATA(insert ( 1247 typdefaultbin        25 -1 -1 22 0 -1 -1 f x i f f f t 0));
 
272
DATA(insert ( 1247 typdefault           25 -1 -1 23 0 -1 -1 f x i f f f t 0));
 
273
DATA(insert ( 1247 ctid                         27 0  6  -1 0 -1 -1 f p s t f f t 0));
 
274
DATA(insert ( 1247 oid                          26 0  4  -2 0 -1 -1 t p i t f f t 0));
 
275
DATA(insert ( 1247 xmin                         28 0  4  -3 0 -1 -1 t p i t f f t 0));
 
276
DATA(insert ( 1247 cmin                         29 0  4  -4 0 -1 -1 t p i t f f t 0));
 
277
DATA(insert ( 1247 xmax                         28 0  4  -5 0 -1 -1 t p i t f f t 0));
 
278
DATA(insert ( 1247 cmax                         29 0  4  -6 0 -1 -1 t p i t f f t 0));
 
279
DATA(insert ( 1247 tableoid                     26 0  4  -7 0 -1 -1 t p i t f f t 0));
 
280
 
 
281
/* ----------------
 
282
 *              pg_database
 
283
 * ----------------
 
284
 */
 
285
DATA(insert ( 1262 datname                      19 -1 NAMEDATALEN       1 0 -1 -1 f p i t f f t 0));
 
286
DATA(insert ( 1262 datdba                       23 -1 4   2 0 -1 -1 t p i t f f t 0));
 
287
DATA(insert ( 1262 encoding                     23 -1 4   3 0 -1 -1 t p i t f f t 0));
 
288
DATA(insert ( 1262 datistemplate        16 -1 1   4 0 -1 -1 t p c t f f t 0));
 
289
DATA(insert ( 1262 datallowconn         16 -1 1   5 0 -1 -1 t p c t f f t 0));
 
290
DATA(insert ( 1262 datlastsysoid        26 -1 4   6 0 -1 -1 t p i t f f t 0));
 
291
DATA(insert ( 1262 datvacuumxid         28 -1 4   7 0 -1 -1 t p i t f f t 0));
 
292
DATA(insert ( 1262 datfrozenxid         28 -1 4   8 0 -1 -1 t p i t f f t 0));
 
293
DATA(insert ( 1262 dattablespace        26 -1 4   9 0 -1 -1 t p i t f f t 0));
 
294
DATA(insert ( 1262 datconfig      1009 -1 -1 10 1 -1 -1 f x i f f f t 0));
 
295
DATA(insert ( 1262 datacl                 1034 -1 -1 11 1 -1 -1 f x i f f f t 0));
 
296
DATA(insert ( 1262 ctid                         27 0  6  -1 0 -1 -1 f p s t f f t 0));
 
297
DATA(insert ( 1262 oid                          26 0  4  -2 0 -1 -1 t p i t f f t 0));
 
298
DATA(insert ( 1262 xmin                         28 0  4  -3 0 -1 -1 t p i t f f t 0));
 
299
DATA(insert ( 1262 cmin                         29 0  4  -4 0 -1 -1 t p i t f f t 0));
 
300
DATA(insert ( 1262 xmax                         28 0  4  -5 0 -1 -1 t p i t f f t 0));
 
301
DATA(insert ( 1262 cmax                         29 0  4  -6 0 -1 -1 t p i t f f t 0));
 
302
DATA(insert ( 1262 tableoid                     26 0  4  -7 0 -1 -1 t p i t f f t 0));
 
303
 
 
304
/* ----------------
 
305
 *              pg_proc
 
306
 * ----------------
 
307
 */
 
308
#define Schema_pg_proc \
 
309
{ 1255, {"proname"},                    19, -1, NAMEDATALEN,  1, 0, -1, -1, false, 'p', 'i', true, false, false, true, 0 }, \
 
310
{ 1255, {"pronamespace"},               26, -1, 4,      2, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
 
311
{ 1255, {"proowner"},                   23, -1, 4,      3, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
 
312
{ 1255, {"prolang"},                    26, -1, 4,      4, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
 
313
{ 1255, {"proisagg"},                   16, -1, 1,      5, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
 
314
{ 1255, {"prosecdef"},                  16, -1, 1,      6, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
 
315
{ 1255, {"proisstrict"},                16, -1, 1,      7, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
 
316
{ 1255, {"proretset"},                  16, -1, 1,      8, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
 
317
{ 1255, {"provolatile"},                18, -1, 1,      9, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
 
318
{ 1255, {"pronargs"},                   21, -1, 2, 10, 0, -1, -1, true, 'p', 's', true, false, false, true, 0 }, \
 
319
{ 1255, {"prorettype"},                 26, -1, 4, 11, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
 
320
{ 1255, {"proargtypes"},                30, -1, INDEX_MAX_KEYS*4, 12, 0, -1, -1, false, 'p', 'i', true, false, false, true, 0 }, \
 
321
{ 1255, {"proargnames"},          1009, -1, -1, 13, 1, -1, -1, false, 'x', 'i', false, false, false, true, 0 }, \
 
322
{ 1255, {"prosrc"},                             25, -1, -1, 14, 0, -1, -1, false, 'x', 'i', false, false, false, true, 0 }, \
 
323
{ 1255, {"probin"},                             17, -1, -1, 15, 0, -1, -1, false, 'x', 'i', false, false, false, true, 0 }, \
 
324
{ 1255, {"proacl"},                       1034, -1, -1, 16, 1, -1, -1, false, 'x', 'i', false, false, false, true, 0 }
 
325
 
 
326
DATA(insert ( 1255 proname                      19 -1 NAMEDATALEN       1 0 -1 -1 f p i t f f t 0));
 
327
DATA(insert ( 1255 pronamespace         26 -1 4   2 0 -1 -1 t p i t f f t 0));
 
328
DATA(insert ( 1255 proowner                     23 -1 4   3 0 -1 -1 t p i t f f t 0));
 
329
DATA(insert ( 1255 prolang                      26 -1 4   4 0 -1 -1 t p i t f f t 0));
 
330
DATA(insert ( 1255 proisagg                     16 -1 1   5 0 -1 -1 t p c t f f t 0));
 
331
DATA(insert ( 1255 prosecdef            16 -1 1   6 0 -1 -1 t p c t f f t 0));
 
332
DATA(insert ( 1255 proisstrict          16 -1 1   7 0 -1 -1 t p c t f f t 0));
 
333
DATA(insert ( 1255 proretset            16 -1 1   8 0 -1 -1 t p c t f f t 0));
 
334
DATA(insert ( 1255 provolatile          18 -1 1   9 0 -1 -1 t p c t f f t 0));
 
335
DATA(insert ( 1255 pronargs                     21 -1 2  10 0 -1 -1 t p s t f f t 0));
 
336
DATA(insert ( 1255 prorettype           26 -1 4  11 0 -1 -1 t p i t f f t 0));
 
337
DATA(insert ( 1255 proargtypes          30 -1 INDEX_MAX_KEYS*4 12 0 -1 -1 f p i t f f t 0));
 
338
DATA(insert ( 1255 proargnames    1009 -1 -1 13 1 -1 -1 f x i f f f t 0));
 
339
DATA(insert ( 1255 prosrc                       25 -1 -1 14 0 -1 -1 f x i f f f t 0));
 
340
DATA(insert ( 1255 probin                       17 -1 -1 15 0 -1 -1 f x i f f f t 0));
 
341
DATA(insert ( 1255 proacl                 1034 -1 -1 16 1 -1 -1 f x i f f f t 0));
 
342
DATA(insert ( 1255 ctid                         27 0  6  -1 0 -1 -1 f p s t f f t 0));
 
343
DATA(insert ( 1255 oid                          26 0  4  -2 0 -1 -1 t p i t f f t 0));
 
344
DATA(insert ( 1255 xmin                         28 0  4  -3 0 -1 -1 t p i t f f t 0));
 
345
DATA(insert ( 1255 cmin                         29 0  4  -4 0 -1 -1 t p i t f f t 0));
 
346
DATA(insert ( 1255 xmax                         28 0  4  -5 0 -1 -1 t p i t f f t 0));
 
347
DATA(insert ( 1255 cmax                         29 0  4  -6 0 -1 -1 t p i t f f t 0));
 
348
DATA(insert ( 1255 tableoid                     26 0  4  -7 0 -1 -1 t p i t f f t 0));
 
349
 
 
350
/* ----------------
 
351
 *              pg_shadow
 
352
 * ----------------
 
353
 */
 
354
DATA(insert ( 1260 usename                      19      -1 NAMEDATALEN  1 0 -1 -1 f p i t f f t 0));
 
355
DATA(insert ( 1260 usesysid                     23      -1      4       2 0 -1 -1 t p i t f f t 0));
 
356
DATA(insert ( 1260 usecreatedb          16      -1      1       3 0 -1 -1 t p c t f f t 0));
 
357
DATA(insert ( 1260 usesuper                     16      -1      1       4 0 -1 -1 t p c t f f t 0));
 
358
DATA(insert ( 1260 usecatupd            16      -1      1       5 0 -1 -1 t p c t f f t 0));
 
359
DATA(insert ( 1260 passwd                       25      -1 -1   6 0 -1 -1 f x i f f f t 0));
 
360
DATA(insert ( 1260 valuntil                702  -1      4       7 0 -1 -1 t p i f f f t 0));
 
361
DATA(insert ( 1260 useconfig      1009  -1 -1   8 1 -1 -1 f x i f f f t 0));
 
362
DATA(insert ( 1260 ctid                         27 0  6  -1 0 -1 -1 f p s t f f t 0));
 
363
/* no OIDs in pg_shadow */
 
364
DATA(insert ( 1260 xmin                         28 0  4  -3 0 -1 -1 t p i t f f t 0));
 
365
DATA(insert ( 1260 cmin                         29 0  4  -4 0 -1 -1 t p i t f f t 0));
 
366
DATA(insert ( 1260 xmax                         28 0  4  -5 0 -1 -1 t p i t f f t 0));
 
367
DATA(insert ( 1260 cmax                         29 0  4  -6 0 -1 -1 t p i t f f t 0));
 
368
DATA(insert ( 1260 tableoid                     26 0  4  -7 0 -1 -1 t p i t f f t 0));
 
369
 
 
370
/* ----------------
 
371
 *              pg_group
 
372
 * ----------------
 
373
 */
 
374
DATA(insert ( 1261 groname                      19 -1 NAMEDATALEN  1 0 -1 -1 f p i t f f t 0));
 
375
DATA(insert ( 1261 grosysid                     23 -1  4   2 0 -1 -1 t p i t f f t 0));
 
376
DATA(insert ( 1261 grolist                1007 -1 -1   3 1 -1 -1 f x i f f f t 0));
 
377
DATA(insert ( 1261 ctid                         27 0  6  -1 0 -1 -1 f p s t f f t 0));
 
378
/* no OIDs in pg_group */
 
379
DATA(insert ( 1261 xmin                         28 0  4  -3 0 -1 -1 t p i t f f t 0));
 
380
DATA(insert ( 1261 cmin                         29 0  4  -4 0 -1 -1 t p i t f f t 0));
 
381
DATA(insert ( 1261 xmax                         28 0  4  -5 0 -1 -1 t p i t f f t 0));
 
382
DATA(insert ( 1261 cmax                         29 0  4  -6 0 -1 -1 t p i t f f t 0));
 
383
DATA(insert ( 1261 tableoid                     26 0  4  -7 0 -1 -1 t p i t f f t 0));
 
384
 
 
385
/* ----------------
 
386
 *              pg_attribute
 
387
 * ----------------
 
388
 */
 
389
#define Schema_pg_attribute \
 
390
{ 1249, {"attrelid"},     26, -1,       4,      1, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
 
391
{ 1249, {"attname"},      19, -1, NAMEDATALEN,  2, 0, -1, -1, false, 'p', 'i', true, false, false, true, 0 }, \
 
392
{ 1249, {"atttypid"},     26, -1,       4,      3, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
 
393
{ 1249, {"attstattarget"}, 23, -1,      4,      4, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
 
394
{ 1249, {"attlen"},               21, -1,       2,      5, 0, -1, -1, true, 'p', 's', true, false, false, true, 0 }, \
 
395
{ 1249, {"attnum"},               21, -1,       2,      6, 0, -1, -1, true, 'p', 's', true, false, false, true, 0 }, \
 
396
{ 1249, {"attndims"},     23, -1,       4,      7, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
 
397
{ 1249, {"attcacheoff"},  23, -1,       4,      8, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
 
398
{ 1249, {"atttypmod"},    23, -1,       4,      9, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
 
399
{ 1249, {"attbyval"},     16, -1,       1, 10, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
 
400
{ 1249, {"attstorage"},   18, -1,       1, 11, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
 
401
{ 1249, {"attalign"},     18, -1,       1, 12, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
 
402
{ 1249, {"attnotnull"},   16, -1,       1, 13, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
 
403
{ 1249, {"atthasdef"},    16, -1,       1, 14, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
 
404
{ 1249, {"attisdropped"}, 16, -1,       1, 15, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
 
405
{ 1249, {"attislocal"},   16, -1,       1, 16, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
 
406
{ 1249, {"attinhcount"},  23, -1,       4, 17, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }
 
407
 
 
408
DATA(insert ( 1249 attrelid                     26 -1  4   1 0 -1 -1 t p i t f f t 0));
 
409
DATA(insert ( 1249 attname                      19 -1 NAMEDATALEN  2 0 -1 -1 f p i t f f t 0));
 
410
DATA(insert ( 1249 atttypid                     26 -1  4   3 0 -1 -1 t p i t f f t 0));
 
411
DATA(insert ( 1249 attstattarget        23 -1  4   4 0 -1 -1 t p i t f f t 0));
 
412
DATA(insert ( 1249 attlen                       21 -1  2   5 0 -1 -1 t p s t f f t 0));
 
413
DATA(insert ( 1249 attnum                       21 -1  2   6 0 -1 -1 t p s t f f t 0));
 
414
DATA(insert ( 1249 attndims                     23 -1  4   7 0 -1 -1 t p i t f f t 0));
 
415
DATA(insert ( 1249 attcacheoff          23 -1  4   8 0 -1 -1 t p i t f f t 0));
 
416
DATA(insert ( 1249 atttypmod            23 -1  4   9 0 -1 -1 t p i t f f t 0));
 
417
DATA(insert ( 1249 attbyval                     16 -1  1  10 0 -1 -1 t p c t f f t 0));
 
418
DATA(insert ( 1249 attstorage           18 -1  1  11 0 -1 -1 t p c t f f t 0));
 
419
DATA(insert ( 1249 attalign                     18 -1  1  12 0 -1 -1 t p c t f f t 0));
 
420
DATA(insert ( 1249 attnotnull           16 -1  1  13 0 -1 -1 t p c t f f t 0));
 
421
DATA(insert ( 1249 atthasdef            16 -1  1  14 0 -1 -1 t p c t f f t 0));
 
422
DATA(insert ( 1249 attisdropped         16 -1  1  15 0 -1 -1 t p c t f f t 0));
 
423
DATA(insert ( 1249 attislocal           16 -1  1  16 0 -1 -1 t p c t f f t 0));
 
424
DATA(insert ( 1249 attinhcount          23 -1  4  17 0 -1 -1 t p i t f f t 0));
 
425
DATA(insert ( 1249 ctid                         27 0  6  -1 0 -1 -1 f p s t f f t 0));
 
426
/* no OIDs in pg_attribute */
 
427
DATA(insert ( 1249 xmin                         28 0  4  -3 0 -1 -1 t p i t f f t 0));
 
428
DATA(insert ( 1249 cmin                         29 0  4  -4 0 -1 -1 t p i t f f t 0));
 
429
DATA(insert ( 1249 xmax                         28 0  4  -5 0 -1 -1 t p i t f f t 0));
 
430
DATA(insert ( 1249 cmax                         29 0  4  -6 0 -1 -1 t p i t f f t 0));
 
431
DATA(insert ( 1249 tableoid                     26 0  4  -7 0 -1 -1 t p i t f f t 0));
 
432
 
 
433
/* ----------------
 
434
 *              pg_class
 
435
 * ----------------
 
436
 */
 
437
#define Schema_pg_class \
 
438
{ 1259, {"relname"},       19, -1, NAMEDATALEN, 1, 0, -1, -1, false, 'p', 'i', true, false, false, true, 0 }, \
 
439
{ 1259, {"relnamespace"},  26, -1,      4,      2, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
 
440
{ 1259, {"reltype"},       26, -1,      4,      3, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
 
441
{ 1259, {"relowner"},      23, -1,      4,      4, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
 
442
{ 1259, {"relam"},                 26, -1,      4,      5, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
 
443
{ 1259, {"relfilenode"},   26, -1,      4,      6, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
 
444
{ 1259, {"reltablespace"}, 26, -1,      4,      7, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
 
445
{ 1259, {"relpages"},      23, -1,      4,      8, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
 
446
{ 1259, {"reltuples"},     700, -1, 4,  9, 0, -1, -1, false, 'p', 'i', true, false, false, true, 0 }, \
 
447
{ 1259, {"reltoastrelid"}, 26, -1,      4, 10, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
 
448
{ 1259, {"reltoastidxid"}, 26, -1,      4, 11, 0, -1, -1, true, 'p', 'i', true, false, false, true, 0 }, \
 
449
{ 1259, {"relhasindex"},   16, -1,      1, 12, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
 
450
{ 1259, {"relisshared"},   16, -1,      1, 13, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
 
451
{ 1259, {"relkind"},       18, -1,      1, 14, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
 
452
{ 1259, {"relnatts"},      21, -1,      2, 15, 0, -1, -1, true, 'p', 's', true, false, false, true, 0 }, \
 
453
{ 1259, {"relchecks"},     21, -1,      2, 16, 0, -1, -1, true, 'p', 's', true, false, false, true, 0 }, \
 
454
{ 1259, {"reltriggers"},   21, -1,      2, 17, 0, -1, -1, true, 'p', 's', true, false, false, true, 0 }, \
 
455
{ 1259, {"relukeys"},      21, -1,      2, 18, 0, -1, -1, true, 'p', 's', true, false, false, true, 0 }, \
 
456
{ 1259, {"relfkeys"},      21, -1,      2, 19, 0, -1, -1, true, 'p', 's', true, false, false, true, 0 }, \
 
457
{ 1259, {"relrefs"},       21, -1,      2, 20, 0, -1, -1, true, 'p', 's', true, false, false, true, 0 }, \
 
458
{ 1259, {"relhasoids"},    16, -1,      1, 21, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
 
459
{ 1259, {"relhaspkey"},    16, -1,      1, 22, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
 
460
{ 1259, {"relhasrules"},   16, -1,      1, 23, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
 
461
{ 1259, {"relhassubclass"},16, -1,      1, 24, 0, -1, -1, true, 'p', 'c', true, false, false, true, 0 }, \
 
462
{ 1259, {"relacl"},              1034, -1, -1, 25, 1, -1, -1, false, 'x', 'i', false, false, false, true, 0 }
 
463
 
 
464
DATA(insert ( 1259 relname                      19 -1 NAMEDATALEN       1 0 -1 -1 f p i t f f t 0));
 
465
DATA(insert ( 1259 relnamespace         26 -1 4   2 0 -1 -1 t p i t f f t 0));
 
466
DATA(insert ( 1259 reltype                      26 -1 4   3 0 -1 -1 t p i t f f t 0));
 
467
DATA(insert ( 1259 relowner                     23 -1 4   4 0 -1 -1 t p i t f f t 0));
 
468
DATA(insert ( 1259 relam                        26 -1 4   5 0 -1 -1 t p i t f f t 0));
 
469
DATA(insert ( 1259 relfilenode          26 -1 4   6 0 -1 -1 t p i t f f t 0));
 
470
DATA(insert ( 1259 reltablespace        26 -1 4   7 0 -1 -1 t p i t f f t 0));
 
471
DATA(insert ( 1259 relpages                     23 -1 4   8 0 -1 -1 t p i t f f t 0));
 
472
DATA(insert ( 1259 reltuples       700 -1 4   9 0 -1 -1 f p i t f f t 0));
 
473
DATA(insert ( 1259 reltoastrelid        26 -1 4  10 0 -1 -1 t p i t f f t 0));
 
474
DATA(insert ( 1259 reltoastidxid        26 -1 4  11 0 -1 -1 t p i t f f t 0));
 
475
DATA(insert ( 1259 relhasindex          16 -1 1  12 0 -1 -1 t p c t f f t 0));
 
476
DATA(insert ( 1259 relisshared          16 -1 1  13 0 -1 -1 t p c t f f t 0));
 
477
DATA(insert ( 1259 relkind                      18 -1 1  14 0 -1 -1 t p c t f f t 0));
 
478
DATA(insert ( 1259 relnatts                     21 -1 2  15 0 -1 -1 t p s t f f t 0));
 
479
DATA(insert ( 1259 relchecks            21 -1 2  16 0 -1 -1 t p s t f f t 0));
 
480
DATA(insert ( 1259 reltriggers          21 -1 2  17 0 -1 -1 t p s t f f t 0));
 
481
DATA(insert ( 1259 relukeys                     21 -1 2  18 0 -1 -1 t p s t f f t 0));
 
482
DATA(insert ( 1259 relfkeys                     21 -1 2  19 0 -1 -1 t p s t f f t 0));
 
483
DATA(insert ( 1259 relrefs                      21 -1 2  20 0 -1 -1 t p s t f f t 0));
 
484
DATA(insert ( 1259 relhasoids           16 -1 1  21 0 -1 -1 t p c t f f t 0));
 
485
DATA(insert ( 1259 relhaspkey           16 -1 1  22 0 -1 -1 t p c t f f t 0));
 
486
DATA(insert ( 1259 relhasrules          16 -1 1  23 0 -1 -1 t p c t f f t 0));
 
487
DATA(insert ( 1259 relhassubclass       16 -1 1  24 0 -1 -1 t p c t f f t 0));
 
488
DATA(insert ( 1259 relacl                 1034 -1 -1 25 1 -1 -1 f x i f f f t 0));
 
489
DATA(insert ( 1259 ctid                         27 0  6  -1 0 -1 -1 f p s t f f t 0));
 
490
DATA(insert ( 1259 oid                          26 0  4  -2 0 -1 -1 t p i t f f t 0));
 
491
DATA(insert ( 1259 xmin                         28 0  4  -3 0 -1 -1 t p i t f f t 0));
 
492
DATA(insert ( 1259 cmin                         29 0  4  -4 0 -1 -1 t p i t f f t 0));
 
493
DATA(insert ( 1259 xmax                         28 0  4  -5 0 -1 -1 t p i t f f t 0));
 
494
DATA(insert ( 1259 cmax                         29 0  4  -6 0 -1 -1 t p i t f f t 0));
 
495
DATA(insert ( 1259 tableoid                     26 0  4  -7 0 -1 -1 t p i t f f t 0));
 
496
 
 
497
/* ----------------
 
498
 *              pg_tablespace
 
499
 * ----------------
 
500
 */
 
501
 
 
502
DATA(insert ( 1213 spcname                      19 -1 NAMEDATALEN 1 0 -1 -1 f p i t f f t 0));
 
503
DATA(insert ( 1213 spcowner                     23 -1 4  2 0  -1 -1 t p i t f f t 0));
 
504
DATA(insert ( 1213 spclocation          25 -1 -1 3 0  -1 -1 f x i t f f t 0));
 
505
DATA(insert ( 1213 spcacl                 1034 -1 -1 4 1  -1 -1 f x i f f f t 0));
 
506
DATA(insert ( 1213 ctid                         27 0  6  -1 0 -1 -1 f p s t f f t 0));
 
507
DATA(insert ( 1213 oid                          26 0  4  -2 0 -1 -1 t p i t f f t 0));
 
508
DATA(insert ( 1213 xmin                         28 0  4  -3 0 -1 -1 t p i t f f t 0));
 
509
DATA(insert ( 1213 cmin                         29 0  4  -4 0 -1 -1 t p i t f f t 0));
 
510
DATA(insert ( 1213 xmax                         28 0  4  -5 0 -1 -1 t p i t f f t 0));
 
511
DATA(insert ( 1213 cmax                         29 0  4  -6 0 -1 -1 t p i t f f t 0));
 
512
DATA(insert ( 1213 tableoid                     26 0  4  -7 0 -1 -1 t p i t f f t 0));
 
513
 
 
514
/* ----------------
 
515
 *              pg_xactlock - this is not a real relation, but is a placeholder
 
516
 *                                to allow a relation OID to be used for transaction
 
517
 *                                waits.  We need a pg_xactlock entry in pg_class only to
 
518
 *                                ensure that that OID can never be allocated to a real
 
519
 *                                table; and this entry is just to link to that one.
 
520
 * ----------------
 
521
 */
 
522
DATA(insert ( 376 xactlockfoo           26 0  4   1 0 -1 -1 t p i t f f t 0));
 
523
 
 
524
#endif   /* PG_ATTRIBUTE_H */