7
7
*
8
8
*
9
9
* IDENTIFICATION
10
- * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.35 1998/01/15 19:42: 27 pgsql Exp $
10
+ * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.36 1998/01/16 23: 19:27 momjian Exp $
11
11
*
12
12
*
13
13
* INTERFACE ROUTINES
@@ -107,6 +107,7 @@ DefaultBuild(Relation heapRelation, Relation indexRelation,
107
107
* AttrNumber attnum;
108
108
* uint32 attnelems;
109
109
* int32 attcacheoff;
110
+ * int16 atttypmod;
110
111
* bool attbyval;
111
112
* bool attisset;
112
113
* char attalign;
@@ -117,12 +118,12 @@ DefaultBuild(Relation heapRelation, Relation indexRelation,
117
118
* ----------------------------------------------------------------
118
119
*/
119
120
static FormData_pg_attribute sysatts [] = {
120
- {0l , {"ctid" }, 27l , 0l , 6 , -1 , 0 , -1 , '\0' , '\0' , 'i' , '\0' , '\0' },
121
- {0l , {"oid" }, 26l , 0l , 4 , -2 , 0 , -1 , '\001' , '\0' , 'i' , '\0' , '\0' },
122
- {0l , {"xmin" }, 28l , 0l , 4 , -3 , 0 , -1 , '\0' , '\0' , 'i' , '\0' , '\0' },
123
- {0l , {"cmin" }, 29l , 0l , 4 , -4 , 0 , -1 , '\001' , '\0' , 'i' , '\0' , '\0' },
124
- {0l , {"xmax" }, 28l , 0l , 4 , -5 , 0 , -1 , '\0' , '\0' , 'i' , '\0' , '\0' },
125
- {0l , {"cmax" }, 29l , 0l , 4 , -6 , 0 , -1 , '\001' , '\0' , 'i' , '\0' , '\0' },
121
+ {0l , {"ctid" }, 27l , 0l , 6 , -1 , 0 , -1 , 0 , '\0' , '\0' , 'i' , '\0' , '\0' },
122
+ {0l , {"oid" }, 26l , 0l , 4 , -2 , 0 , -1 , 0 , '\001' , '\0' , 'i' , '\0' , '\0' },
123
+ {0l , {"xmin" }, 28l , 0l , 4 , -3 , 0 , -1 , 0 , '\0' , '\0' , 'i' , '\0' , '\0' },
124
+ {0l , {"cmin" }, 29l , 0l , 4 , -4 , 0 , -1 , 0 , '\001' , '\0' , 'i' , '\0' , '\0' },
125
+ {0l , {"xmax" }, 28l , 0l , 4 , -5 , 0 , -1 , 0 , '\0' , '\0' , 'i' , '\0' , '\0' },
126
+ {0l , {"cmax" }, 29l , 0l , 4 , -6 , 0 , -1 , 0 , '\001' , '\0' , 'i' , '\0' , '\0' },
126
127
};
127
128
128
129
/* ----------------------------------------------------------------
@@ -436,6 +437,7 @@ ConstructTupleDescriptor(Oid heapoid,
436
437
437
438
((AttributeTupleForm ) to )-> attnotnull = false;
438
439
((AttributeTupleForm ) to )-> atthasdef = false;
440
+ ((AttributeTupleForm ) to )-> atttypmod = 0 ;
439
441
440
442
/*
441
443
* if the keytype is defined, we need to change the tuple form's
@@ -454,11 +456,11 @@ ConstructTupleDescriptor(Oid heapoid,
454
456
((AttributeTupleForm ) to )-> atttypid = tup -> t_oid ;
455
457
((AttributeTupleForm ) to )-> attbyval =
456
458
((TypeTupleForm ) ((char * ) tup + tup -> t_hoff ))-> typbyval ;
457
- if (IndexKeyType -> typlen > 0 )
458
- ((AttributeTupleForm ) to )-> attlen = IndexKeyType -> typlen ;
459
- else
460
- ((AttributeTupleForm ) to )-> attlen =
459
+
460
+ ((AttributeTupleForm ) to )-> attlen =
461
461
((TypeTupleForm ) ((char * ) tup + tup -> t_hoff ))-> typlen ;
462
+
463
+ ((AttributeTupleForm ) to )-> atttypmod = IndexKeyType -> typmod ;
462
464
}
463
465
464
466
0 commit comments