*** pgsql/src/backend/utils/cache/relcache.c 2009/01/22 17:27:54 1.281 --- pgsql/src/backend/utils/cache/relcache.c 2009/01/22 20:16:06 1.282 *************** *** 8,14 **** * * * IDENTIFICATION ! * $PostgreSQL: pgsql/src/backend/utils/cache/relcache.c,v 1.280 2009/01/01 17:23:50 momjian Exp $ * *------------------------------------------------------------------------- */ --- 8,14 ---- * * * IDENTIFICATION ! * $PostgreSQL: pgsql/src/backend/utils/cache/relcache.c,v 1.281 2009/01/22 17:27:54 petere Exp $ * *------------------------------------------------------------------------- */ *************** RelationBuildTupleDesc(Relation relation *** 480,486 **** memcpy(relation->rd_att->attrs[attp->attnum - 1], attp, ! ATTRIBUTE_TUPLE_SIZE); /* Update constraint/default info */ if (attp->attnotnull) --- 480,486 ---- memcpy(relation->rd_att->attrs[attp->attnum - 1], attp, ! ATTRIBUTE_FIXED_PART_SIZE); /* Update constraint/default info */ if (attp->attnotnull) *************** formrdesc(const char *relationName, Oid *** 1449,1455 **** { memcpy(relation->rd_att->attrs[i], &att[i], ! ATTRIBUTE_TUPLE_SIZE); has_not_null |= att[i].attnotnull; /* make sure attcacheoff is valid */ relation->rd_att->attrs[i]->attcacheoff = -1; --- 1449,1455 ---- { memcpy(relation->rd_att->attrs[i], &att[i], ! ATTRIBUTE_FIXED_PART_SIZE); has_not_null |= att[i].attnotnull; /* make sure attcacheoff is valid */ relation->rd_att->attrs[i]->attcacheoff = -1; *************** BuildHardcodedDescriptor(int natts, Form *** 2714,2720 **** for (i = 0; i < natts; i++) { ! memcpy(result->attrs[i], &attrs[i], ATTRIBUTE_TUPLE_SIZE); /* make sure attcacheoff is valid */ result->attrs[i]->attcacheoff = -1; } --- 2714,2720 ---- for (i = 0; i < natts; i++) { ! memcpy(result->attrs[i], &attrs[i], ATTRIBUTE_FIXED_PART_SIZE); /* make sure attcacheoff is valid */ result->attrs[i]->attcacheoff = -1; } *************** load_relcache_init_file(void) *** 3441,3447 **** { if ((nread = fread(&len, 1, sizeof(len), fp)) != sizeof(len)) goto read_failed; ! if (len != ATTRIBUTE_TUPLE_SIZE) goto read_failed; if ((nread = fread(rel->rd_att->attrs[i], 1, len, fp)) != len) goto read_failed; --- 3441,3447 ---- { if ((nread = fread(&len, 1, sizeof(len), fp)) != sizeof(len)) goto read_failed; ! if (len != ATTRIBUTE_FIXED_PART_SIZE) goto read_failed; if ((nread = fread(rel->rd_att->attrs[i], 1, len, fp)) != len) goto read_failed; *************** write_relcache_init_file(void) *** 3751,3757 **** /* next, do all the attribute tuple form data entries */ for (i = 0; i < relform->relnatts; i++) { ! write_item(rel->rd_att->attrs[i], ATTRIBUTE_TUPLE_SIZE, fp); } /* next, do the access method specific field */ --- 3751,3757 ---- /* next, do all the attribute tuple form data entries */ for (i = 0; i < relform->relnatts; i++) { ! write_item(rel->rd_att->attrs[i], ATTRIBUTE_FIXED_PART_SIZE, fp); } /* next, do the access method specific field */