8
8
*
9
9
*
10
10
* IDENTIFICATION
11
- * $PostgreSQL: pgsql/src/backend/catalog/heap.c,v 1.356 2009/07/30 02:45:36 tgl Exp $
11
+ * $PostgreSQL: pgsql/src/backend/catalog/heap.c,v 1.357 2009/08/02 22:14:52 tgl Exp $
12
12
*
13
13
*
14
14
* INTERFACE ROUTINES
@@ -111,37 +111,37 @@ static List *insert_ordered_unique_oid(List *list, Oid datum);
111
111
*/
112
112
113
113
static FormData_pg_attribute a1 = {
114
- 0 , {"ctid" },TIDOID ,0 ,sizeof (ItemPointerData ),
114
+ 0 , {"ctid" },TIDOID ,0 ,0 , sizeof (ItemPointerData ),
115
115
SelfItemPointerAttributeNumber ,0 ,-1 ,-1 ,
116
116
false,'p' ,'s' , true, false, false, true,0 , {0 }
117
117
};
118
118
119
119
static FormData_pg_attribute a2 = {
120
- 0 , {"oid" },OIDOID ,0 ,sizeof (Oid ),
120
+ 0 , {"oid" },OIDOID ,0 ,0 , sizeof (Oid ),
121
121
ObjectIdAttributeNumber ,0 ,-1 ,-1 ,
122
122
true,'p' ,'i' , true, false, false, true,0 , {0 }
123
123
};
124
124
125
125
static FormData_pg_attribute a3 = {
126
- 0 , {"xmin" },XIDOID ,0 ,sizeof (TransactionId ),
126
+ 0 , {"xmin" },XIDOID ,0 ,0 , sizeof (TransactionId ),
127
127
MinTransactionIdAttributeNumber ,0 ,-1 ,-1 ,
128
128
true,'p' ,'i' , true, false, false, true,0 , {0 }
129
129
};
130
130
131
131
static FormData_pg_attribute a4 = {
132
- 0 , {"cmin" },CIDOID ,0 ,sizeof (CommandId ),
132
+ 0 , {"cmin" },CIDOID ,0 ,0 , sizeof (CommandId ),
133
133
MinCommandIdAttributeNumber ,0 ,-1 ,-1 ,
134
134
true,'p' ,'i' , true, false, false, true,0 , {0 }
135
135
};
136
136
137
137
static FormData_pg_attribute a5 = {
138
- 0 , {"xmax" },XIDOID ,0 ,sizeof (TransactionId ),
138
+ 0 , {"xmax" },XIDOID ,0 ,0 , sizeof (TransactionId ),
139
139
MaxTransactionIdAttributeNumber ,0 ,-1 ,-1 ,
140
140
true,'p' ,'i' , true, false, false, true,0 , {0 }
141
141
};
142
142
143
143
static FormData_pg_attribute a6 = {
144
- 0 , {"cmax" },CIDOID ,0 ,sizeof (CommandId ),
144
+ 0 , {"cmax" },CIDOID ,0 ,0 , sizeof (CommandId ),
145
145
MaxCommandIdAttributeNumber ,0 ,-1 ,-1 ,
146
146
true,'p' ,'i' , true, false, false, true,0 , {0 }
147
147
};
@@ -153,7 +153,7 @@ static FormData_pg_attribute a6 = {
153
153
* used in SQL.
154
154
*/
155
155
static FormData_pg_attribute a7 = {
156
- 0 , {"tableoid" },OIDOID ,0 ,sizeof (Oid ),
156
+ 0 , {"tableoid" },OIDOID ,0 ,0 , sizeof (Oid ),
157
157
TableOidAttributeNumber ,0 ,-1 ,-1 ,
158
158
true,'p' ,'i' , true, false, false, true,0 , {0 }
159
159
};
@@ -501,6 +501,7 @@ InsertPgAttributeTuple(Relation pg_attribute_rel,
501
501
values [Anum_pg_attribute_attname - 1 ]= NameGetDatum (& new_attribute -> attname );
502
502
values [Anum_pg_attribute_atttypid - 1 ]= ObjectIdGetDatum (new_attribute -> atttypid );
503
503
values [Anum_pg_attribute_attstattarget - 1 ]= Int32GetDatum (new_attribute -> attstattarget );
504
+ values [Anum_pg_attribute_attdistinct - 1 ]= Float4GetDatum (new_attribute -> attdistinct );
504
505
values [Anum_pg_attribute_attlen - 1 ]= Int16GetDatum (new_attribute -> attlen );
505
506
values [Anum_pg_attribute_attnum - 1 ]= Int16GetDatum (new_attribute -> attnum );
506
507
values [Anum_pg_attribute_attndims - 1 ]= Int32GetDatum (new_attribute -> attndims );
@@ -571,6 +572,7 @@ AddNewAttributeTuples(Oid new_rel_oid,
571
572
attr -> attrelid = new_rel_oid ;
572
573
/* Make sure these are OK, too */
573
574
attr -> attstattarget = -1 ;
575
+ attr -> attdistinct = 0 ;
574
576
attr -> attcacheoff = -1 ;
575
577
576
578
InsertPgAttributeTuple (rel ,attr ,indstate );