7
7
*
8
8
* Copyright (c) 1994, Regents of the University of California
9
9
*
10
- * $Id: pg_attribute.h,v 1.47 1999/05/25 16:13:42 momjian Exp $
10
+ * $Id: pg_attribute.h,v 1.48 1999/07/31 19:07:25 tgl Exp $
11
11
*
12
12
* NOTES
13
13
* the genbki.sh script reads this file and generates .bki
40
40
*/
41
41
CATALOG (pg_attribute ) BOOTSTRAP
42
42
{
43
- Oid attrelid ;
43
+ Oid attrelid ; /* OID of relation containing this attribute */
44
44
NameData attname ;
45
45
Oid atttypid ;
46
-
47
46
/*
48
47
* atttypid is the OID of the instance in Catalog Class pg_type that
49
48
* defines the data type of this attribute (e.g. int4). Information
50
49
* in that instance is redundant with the attlen, attbyval, and
51
50
* attalign attributes of this instance, so they had better match or
52
51
* Postgres will fail.
53
52
*/
53
+
54
54
float4 attdisbursion ;
55
- int2 attlen ;
55
+ /*
56
+ * attdisbursion is the disbursion statistic of the column, or zero if
57
+ * the statistic has not been calculated.
58
+ */
56
59
60
+ int2 attlen ;
57
61
/*
58
62
* attlen is a copy of the typlen field from pg_type for this
59
63
* attribute. See atttypid above. See struct Form_pg_type for
60
64
* definition.
61
65
*/
62
- int2 attnum ;
63
66
67
+ int2 attnum ;
64
68
/*
65
69
* attnum is the "attribute number" for the attribute: A value that
66
70
* uniquely identifies this attribute within its class. For user
@@ -74,46 +78,43 @@ CATALOG(pg_attribute) BOOTSTRAP
74
78
*
75
79
* Note that (attnum - 1) is often used as the index to an array.
76
80
*/
77
- int4 attnelems ;
78
81
79
- int4 attcacheoff ;
82
+ int4 attnelems ; /* number of dimensions, if an array type */
80
83
84
+ int4 attcacheoff ;
81
85
/*
82
86
* fastgetattr() uses attcacheoff to cache byte offsets of attributes
83
- * in heap tuples. The data actually stored in pg_attribute (-1)
87
+ * in heap tuples. The value actually stored in pg_attribute (-1)
84
88
* indicates no cached value. But when we copy these tuples into a
85
89
* tuple descriptor, we may then update attcacheoff in the copies.
86
90
* This speeds up the attribute walking process.
87
91
*/
88
92
89
93
int4 atttypmod ;
90
-
91
94
/*
92
- * atttypmod records type-specific modifications supplied at table
93
- * creation time, and passes it to input and output functions as the
94
- * third argument.
95
+ * atttypmod records type-specific data supplied at table creation time
96
+ * (for example, the max length of a varchar field). It is passed to
97
+ * type-specific input and output functions as the third argument.
98
+ * The value will generally be -1 for types that do not need typmod.
95
99
*/
96
100
97
101
bool attbyval ;
98
-
99
102
/*
100
103
* attbyval is a copy of the typbyval field from pg_type for this
101
104
* attribute. See atttypid above. See struct Form_pg_type for
102
105
* definition.
103
106
*/
104
107
bool attisset ;
105
108
char attalign ;
106
-
107
109
/*
108
110
* attalign is a copy of the typalign field from pg_type for this
109
111
* attribute. See atttypid above. See struct Form_pg_type for
110
112
* definition.
111
113
*/
112
- bool attnotnull ;
113
114
115
+ bool attnotnull ;
114
116
/* This flag represents the "NOT NULL" constraint */
115
117
bool atthasdef ;
116
-
117
118
/* Has DEFAULT value or not */
118
119
} FormData_pg_attribute ;
119
120
0 commit comments