|
7 | 7 | *
|
8 | 8 | * Copyright (c) 1994, Regents of the University of California
|
9 | 9 | *
|
10 |
| - * $Id: pg_attribute.h,v 1.1.1.1 1996/07/09 06:21:16 scrappy Exp $ |
| 10 | + * $Id: pg_attribute.h,v 1.2 1996/08/21 04:25:47 scrappy Exp $ |
11 | 11 | *
|
12 | 12 | * NOTES
|
13 | 13 | * the genbki.sh script reads this file and generates .bki
|
|
18 | 18 | * these changes, be sure and change the appropriate Schema_xxx
|
19 | 19 | * macros! -cim 2/5/91
|
20 | 20 | *
|
21 |
| - * fastgetattr() now uses attcacheoff to cache byte offsets of |
22 |
| - * attributes in heap tuples. The data actually stored in |
23 |
| - * pg_attribute (-1) indicates no cached value. But when we copy |
24 |
| - * these tuples into a tuple descriptor, we may then update attcacheoff |
25 |
| - * in the copies. This speeds up the attribute walking process. |
26 |
| - * |
27 | 21 | *-------------------------------------------------------------------------
|
28 | 22 | */
|
29 | 23 | #ifndef PG_ATTRIBUTE_H
|
@@ -54,15 +48,39 @@ CATALOG(pg_attribute) BOOTSTRAP {
|
54 | 48 | int4 attnvals;
|
55 | 49 | Oid atttyparg; /* type arg for arrays/spquel/procs */
|
56 | 50 | int2 attlen;
|
| 51 | + /* attlen is the number of bytes we use to represent the value |
| 52 | + of this attribute, e.g. 4 for an int4. But for a variable length |
| 53 | + attribute, attlen is -1. |
| 54 | + */ |
57 | 55 | int2 attnum;
|
| 56 | + /* attnum is the "attribute number" for the attribute: A |
| 57 | + value that uniquely identifies this attribute within its class. |
| 58 | + For user attributes, Attribute numbers are greater than 0 and |
| 59 | + not greater than the number of attributes in the class. |
| 60 | + I.e. if the Class pg_class says that Class XYZ has 10 |
| 61 | + attributes, then the user attribute numbers in Class |
| 62 | + pg_attribute must be 1-10. |
| 63 | + |
| 64 | + System attributes have attribute numbers less than 0 that are |
| 65 | + unique within the class, but not constrained to any particular range. |
| 66 | + |
| 67 | + Note that (attnum - 1) is often used as the index to an array. |
| 68 | + */ |
58 | 69 | int2 attbound;
|
59 | 70 | bool attbyval;
|
60 | 71 | bool attcanindex;
|
61 | 72 | Oid attproc; /* spquel? */
|
62 | 73 | int4 attnelems;
|
63 | 74 | int4 attcacheoff;
|
| 75 | + /* fastgetattr() uses attcacheoff to cache byte offsets of |
| 76 | + attributes in heap tuples. The data actually stored in |
| 77 | + pg_attribute (-1) indicates no cached value. But when we |
| 78 | + copy these tuples into a tuple descriptor, we may then update |
| 79 | + attcacheoff in the copies. This speeds up the attribute |
| 80 | + walking process. |
| 81 | + */ |
64 | 82 | bool attisset;
|
65 |
| - char attalign; /* alignment (c=char, s=short, i=int, d=double) */ |
| 83 | + char attalign; /* alignment (c=char, s=short, i=int, d=double) */ |
66 | 84 | } FormData_pg_attribute;
|
67 | 85 |
|
68 | 86 | /*
|
@@ -380,43 +398,43 @@ DATA(insert OID = 0 ( 75 vtype 18 0 0 0 1 -11 0 t t 0 0 -1 f c));
|
380 | 398 | * ----------------
|
381 | 399 | */
|
382 | 400 | #define Schema_pg_class \
|
383 |
| -{ 83l, {"relname"}, 19l, 83l, 0l, 0l, NAMEDATALEN, 1, 0, '\0', '\001', 0l, 0l, -1l, '\0', 'i' }, \ |
384 |
| -{ 83l, {"reltype"}, 26l, 83l, 0l, 0l, 4, 2, 0, '\001', '\001', 0l, 0l, -1l, '\0', 'i' }, \ |
385 |
| -{ 83l, {"relowner"}, 26l, 83l, 0l, 0l, 4, 2, 0, '\001', '\001', 0l, 0l, -1l, '\0', 'i' }, \ |
386 |
| -{ 83l, {"relam"}, 26l, 83l, 0l, 0l, 4, 3, 0, '\001', '\001', 0l, 0l, -1l, '\0', 'i' }, \ |
387 |
| -{ 83l, {"relpages"}, 23, 83l, 0l, 0l, 4, 4, 0, '\001', '\001', 0l, 0l, -1l, '\0', 'i' }, \ |
388 |
| -{ 83l, {"reltuples"}, 23, 83l, 0l, 0l, 4, 5, 0, '\001', '\001', 0l, 0l, -1l, '\0', 'i' }, \ |
389 |
| -{ 83l, {"relexpires"}, 702, 83l, 0l, 0l, 4, 6, 0, '\001', '\001', 0l, 0l, -1l, '\0', 'i' }, \ |
390 |
| -{ 83l, {"relpreserved"}, 703, 83l, 0l, 0l, 4, 7, 0, '\001', '\001', 0l, 0l, -1l, '\0', 'i' }, \ |
391 |
| -{ 83l, {"relhasindex"}, 16, 83l, 0l, 0l, 1, 8, 0, '\001', '\001', 0l, 0l, -1l, '\0', 'c' }, \ |
392 |
| -{ 83l, {"relisshared"}, 16, 83l, 0l, 0l, 1, 9, 0, '\001', '\001', 0l, 0l, -1l, '\0', 'c' }, \ |
393 |
| -{ 83l, {"relkind"}, 18, 83l, 0l, 0l, 1, 10, 0, '\001', '\001', 0l, 0l, -1l, '\0', 'c' }, \ |
394 |
| -{ 83l, {"relarch"}, 18, 83l, 0l, 0l, 1, 11, 0, '\001', '\001', 0l, 0l, -1l, '\0', 'c' }, \ |
395 |
| -{ 83l, {"relnatts"}, 21, 83l, 0l, 0l, 2, 12, 0, '\001', '\001', 0l, 0l, -1l, '\0', 's' }, \ |
396 |
| -{ 83l, {"relsmgr"}, 210l, 83l, 0l, 0l, 2, 13, 0, '\001', '\001', 0l, 0l, -1l, '\0', 's' }, \ |
397 |
| -{ 83l, {"relkey"}, 22, 83l, 0l, 0l, 16, 14, 0, '\0', '\001', 0l, 0l, -1l, '\0', 'i' }, \ |
398 |
| -{ 83l, {"relkeyop"}, 30, 83l, 0l, 0l, 32, 15, 0, '\0', '\001', 0l, 0l, -1l, '\0', 'i' }, \ |
399 |
| -{ 83l, {"relhasrules"}, 16, 83l, 0l, 0l, 1, 16, 0, '\001', '\001', 0l, 0l, -1l, '\0', 'c' }, \ |
400 |
| -{ 83l, {"relacl"}, 1034l, 83l, 0l, 0l, -1, 17, 0, '\0', '\001', 0l, 0l, -1l, '\0', 'i' } |
| 401 | +{ 83l, {"relname"}, 19l, 83l, 0l, 0l, NAMEDATALEN, 1, 0, '\000', '\001', 0l, 0l, -1l, '\0', 'i' }, \ |
| 402 | +{ 83l, {"reltype"}, 26l, 83l, 0l, 0l, 4, 2, 0, '\001', '\001', 0l, 0l, -1l, '\0', 'i' }, \ |
| 403 | +{ 83l, {"relowner"}, 26l, 83l, 0l, 0l, 4, 3, 0, '\001', '\001', 0l, 0l, -1l, '\0', 'i' }, \ |
| 404 | +{ 83l, {"relam"}, 26l, 83l, 0l, 0l, 4, 4, 0, '\001', '\001', 0l, 0l, -1l, '\0', 'i' }, \ |
| 405 | +{ 83l, {"relpages"}, 23, 83l, 0l, 0l, 4, 5, 0, '\001', '\001', 0l, 0l, -1l, '\0', 'i' }, \ |
| 406 | +{ 83l, {"reltuples"}, 23, 83l, 0l, 0l, 4, 6, 0, '\001', '\001', 0l, 0l, -1l, '\0', 'i' }, \ |
| 407 | +{ 83l, {"relexpires"}, 702, 83l, 0l, 0l, 4, 7, 0, '\001', '\001', 0l, 0l, -1l, '\0', 'i' }, \ |
| 408 | +{ 83l, {"relpreserved"}, 703, 83l, 0l, 0l, 4, 8, 0, '\001', '\001', 0l, 0l, -1l, '\0', 'i' }, \ |
| 409 | +{ 83l, {"relhasindex"}, 16, 83l, 0l, 0l, 1, 9, 0, '\001', '\001', 0l, 0l, -1l, '\0', 'c' }, \ |
| 410 | +{ 83l, {"relisshared"}, 16, 83l, 0l, 0l, 1, 10, 0, '\001', '\001', 0l, 0l, -1l, '\0', 'c' }, \ |
| 411 | +{ 83l, {"relkind"}, 18, 83l, 0l, 0l, 1, 11, 0, '\001', '\001', 0l, 0l, -1l, '\0', 'c' }, \ |
| 412 | +{ 83l, {"relarch"}, 18, 83l, 0l, 0l, 1, 12, 0, '\001', '\001', 0l, 0l, -1l, '\0', 'c' }, \ |
| 413 | +{ 83l, {"relnatts"}, 21, 83l, 0l, 0l, 2, 13, 0, '\001', '\001', 0l, 0l, -1l, '\0', 's' }, \ |
| 414 | +{ 83l, {"relsmgr"}, 210l, 83l, 0l, 0l, 2, 14, 0, '\001', '\001', 0l, 0l, -1l, '\0', 's' }, \ |
| 415 | +{ 83l, {"relkey"}, 22, 83l, 0l, 0l, 16, 15, 0, '\000', '\001', 0l, 0l, -1l, '\0', 'i' }, \ |
| 416 | +{ 83l, {"relkeyop"}, 30, 83l, 0l, 0l, 32, 16, 0, '\000', '\001', 0l, 0l, -1l, '\0', 'i' }, \ |
| 417 | +{ 83l, {"relhasrules"}, 16, 83l, 0l, 0l, 1, 17, 0, '\001', '\001', 0l, 0l, -1l, '\0', 'c' }, \ |
| 418 | +{ 83l, {"relacl"}, 1034l, 83l, 0l, 0l, -1, 18, 0, '\000', '\001', 0l, 0l, -1l, '\0', 'i' } |
401 | 419 |
|
402 | 420 | DATA(insert OID = 0 ( 83 relname 19 0 0 0 NAMEDATALEN 1 0 f t 0 0 -1 f i));
|
403 | 421 | DATA(insert OID = 0 ( 83 reltype 26 0 0 0 4 2 0 t t 0 0 -1 f i));
|
404 |
| -DATA(insert OID = 0 ( 83 relowner 26 0 0 0 4 2 0 t t 0 0 -1 f i)); |
405 |
| -DATA(insert OID = 0 ( 83 relam 26 0 0 0 4 3 0 t t 0 0 -1 f i)); |
406 |
| -DATA(insert OID = 0 ( 83 relpages 23 0 0 0 4 4 0 t t 0 0 -1 f i)); |
407 |
| -DATA(insert OID = 0 ( 83 reltuples 23 0 0 0 4 5 0 t t 0 0 -1 f i)); |
408 |
| -DATA(insert OID = 0 ( 83 relexpires 702 0 0 0 4 6 0 t t 0 0 -1 f i)); |
409 |
| -DATA(insert OID = 0 ( 83 relpreserved 702 0 0 0 4 7 0 t t 0 0 -1 f i)); |
410 |
| -DATA(insert OID = 0 ( 83 relhasindex 16 0 0 0 1 8 0 t t 0 0 -1 f c)); |
411 |
| -DATA(insert OID = 0 ( 83 relisshared 16 0 0 0 1 9 0 t t 0 0 -1 f c)); |
412 |
| -DATA(insert OID = 0 ( 83 relkind 18 0 0 0 1 10 0 t t 0 0 -1 f c)); |
413 |
| -DATA(insert OID = 0 ( 83 relarch 18 0 0 0 1 11 0 t t 0 0 -1 f c)); |
414 |
| -DATA(insert OID = 0 ( 83 relnatts 21 0 0 0 2 12 0 t t 0 0 -1 f s)); |
415 |
| -DATA(insert OID = 0 ( 83 relsmgr 210 0 0 0 2 13 0 t t 0 0 -1 f s)); |
416 |
| -DATA(insert OID = 0 ( 83 relkey 22 0 0 0 16 14 0 f t 0 0 -1 f i)); |
417 |
| -DATA(insert OID = 0 ( 83 relkeyop 30 0 0 0 32 15 0 f t 0 0 -1 f i)); |
418 |
| -DATA(insert OID = 0 ( 83 relhasrules 16 0 0 0 1 16 0 t t 0 0 -1 f c)); |
419 |
| -DATA(insert OID = 0 ( 83 relacl 1034 0 0 0 -1 17 0 f t 0 0 -1 f i)); |
| 422 | +DATA(insert OID = 0 ( 83 relowner 26 0 0 0 4 3 0 t t 0 0 -1 f i)); |
| 423 | +DATA(insert OID = 0 ( 83 relam 26 0 0 0 4 4 0 t t 0 0 -1 f i)); |
| 424 | +DATA(insert OID = 0 ( 83 relpages 23 0 0 0 4 5 0 t t 0 0 -1 f i)); |
| 425 | +DATA(insert OID = 0 ( 83 reltuples 23 0 0 0 4 6 0 t t 0 0 -1 f i)); |
| 426 | +DATA(insert OID = 0 ( 83 relexpires 702 0 0 0 4 7 0 t t 0 0 -1 f i)); |
| 427 | +DATA(insert OID = 0 ( 83 relpreserved 703 0 0 0 4 8 0 t t 0 0 -1 f i)); |
| 428 | +DATA(insert OID = 0 ( 83 relhasindex 16 0 0 0 1 9 0 t t 0 0 -1 f c)); |
| 429 | +DATA(insert OID = 0 ( 83 relisshared 16 0 0 0 1 10 0 t t 0 0 -1 f c)); |
| 430 | +DATA(insert OID = 0 ( 83 relkind 18 0 0 0 1 11 0 t t 0 0 -1 f c)); |
| 431 | +DATA(insert OID = 0 ( 83 relarch 18 0 0 0 1 12 0 t t 0 0 -1 f c)); |
| 432 | +DATA(insert OID = 0 ( 83 relnatts 21 0 0 0 2 13 0 t t 0 0 -1 f s)); |
| 433 | +DATA(insert OID = 0 ( 83 relsmgr 210 0 0 0 2 14 0 t t 0 0 -1 f s)); |
| 434 | +DATA(insert OID = 0 ( 83 relkey 22 0 0 0 16 15 0 f t 0 0 -1 f i)); |
| 435 | +DATA(insert OID = 0 ( 83 relkeyop 30 0 0 0 32 16 0 f t 0 0 -1 f i)); |
| 436 | +DATA(insert OID = 0 ( 83 relhasrules 16 0 0 0 1 17 0 t t 0 0 -1 f c)); |
| 437 | +DATA(insert OID = 0 ( 83 relacl 1034 0 0 0 -1 18 0 f t 0 0 -1 f i)); |
420 | 438 | DATA(insert OID = 0 ( 83 ctid 27 0 0 0 6 -1 0 f t 0 0 -1 f i));
|
421 | 439 | DATA(insert OID = 0 ( 83 oid 26 0 0 0 4 -2 0 t t 0 0 -1 f i));
|
422 | 440 | DATA(insert OID = 0 ( 83 xmin 28 0 0 0 4 -3 0 f t 0 0 -1 f i));
|
|
0 commit comments