summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim B. Mikheev <vadim4o@yahoo.com>1997-03-24 07:39:47 +0000
committerVadim B. Mikheev <vadim4o@yahoo.com>1997-03-24 07:39:47 +0000
commitbdae359acc57497df4000a1b2b1542fae821c7e4 (patch)
tree93177981caf88641db623f10ef183968a05d2ae6
parent5d4e3a7511f83df063a3542c213c54095e7a5fcf (diff)
Setting index' attributes attcacheoff to -1 in index_create().
-rw-r--r--src/backend/catalog/index.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c
index 1ef5569bcb9..6362eeddbee 100644
--- a/src/backend/catalog/index.c
+++ b/src/backend/catalog/index.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.12 1997/03/19 07:44:45 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.13 1997/03/24 07:39:47 vadim Exp $
*
*
* INTERFACE ROUTINES
@@ -414,6 +414,9 @@ ConstructTupleDescriptor(Oid heapoid,
to = (char *) (indexTupDesc->attrs[ i ]);
memcpy(to, from, ATTRIBUTE_TUPLE_SIZE);
+
+ ((AttributeTupleForm) to)->attnum = i+1;
+ ((AttributeTupleForm) to)->attcacheoff = -1;
/* if the keytype is defined, we need to change the tuple form's
atttypid & attlen field to match that of the key's type */
@@ -656,8 +659,10 @@ AppendAttributeTuples(Relation indexRelation, int numatts)
* ----------------
*/
replace[ Anum_pg_attribute_attnum - 1 ] = 'r';
+ replace[ Anum_pg_attribute_attcacheoff - 1 ] = 'r';
value[ Anum_pg_attribute_attnum - 1 ] = Int16GetDatum(1);
+ value[ Anum_pg_attribute_attcacheoff - 1 ] = Int32GetDatum(-1);
tuple = heap_addheader(Natts_pg_attribute,
sizeof *(indexRelation->rd_att->attrs[0]),