Skip to content

Commit cf835f9

Browse files
committed
Add comments for attdisbursion field --- NO code change.
1 parent 30da344 commit cf835f9

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

src/include/catalog/pg_attribute.h

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Copyright (c) 1994, Regents of the University of California
99
*
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 $
1111
*
1212
* NOTES
1313
* the genbki.sh script reads this file and generates .bki
@@ -40,27 +40,31 @@
4040
*/
4141
CATALOG(pg_attribute) BOOTSTRAP
4242
{
43-
Oid attrelid;
43+
Oid attrelid; /* OID of relation containing this attribute */
4444
NameData attname;
4545
Oid atttypid;
46-
4746
/*
4847
* atttypid is the OID of the instance in Catalog Class pg_type that
4948
* defines the data type of this attribute (e.g. int4). Information
5049
* in that instance is redundant with the attlen, attbyval, and
5150
* attalign attributes of this instance, so they had better match or
5251
* Postgres will fail.
5352
*/
53+
5454
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+
*/
5659

60+
int2 attlen;
5761
/*
5862
* attlen is a copy of the typlen field from pg_type for this
5963
* attribute. See atttypid above. See struct Form_pg_type for
6064
* definition.
6165
*/
62-
int2 attnum;
6366

67+
int2 attnum;
6468
/*
6569
* attnum is the "attribute number" for the attribute: A value that
6670
* uniquely identifies this attribute within its class. For user
@@ -74,46 +78,43 @@ CATALOG(pg_attribute) BOOTSTRAP
7478
*
7579
* Note that (attnum - 1) is often used as the index to an array.
7680
*/
77-
int4 attnelems;
7881

79-
int4 attcacheoff;
82+
int4 attnelems; /* number of dimensions, if an array type */
8083

84+
int4 attcacheoff;
8185
/*
8286
* 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)
8488
* indicates no cached value. But when we copy these tuples into a
8589
* tuple descriptor, we may then update attcacheoff in the copies.
8690
* This speeds up the attribute walking process.
8791
*/
8892

8993
int4 atttypmod;
90-
9194
/*
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.
9599
*/
96100

97101
bool attbyval;
98-
99102
/*
100103
* attbyval is a copy of the typbyval field from pg_type for this
101104
* attribute. See atttypid above. See struct Form_pg_type for
102105
* definition.
103106
*/
104107
bool attisset;
105108
char attalign;
106-
107109
/*
108110
* attalign is a copy of the typalign field from pg_type for this
109111
* attribute. See atttypid above. See struct Form_pg_type for
110112
* definition.
111113
*/
112-
bool attnotnull;
113114

115+
bool attnotnull;
114116
/* This flag represents the "NOT NULL" constraint */
115117
bool atthasdef;
116-
117118
/* Has DEFAULT value or not */
118119
} FormData_pg_attribute;
119120

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy