Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rowley2024-12-20 10:22:37 +0000
committerDavid Rowley2024-12-20 10:22:37 +0000
commit02a8d0c45253eb54e57b1974c8627e5be3e1d852 (patch)
treeb87019e24e20f27319f9e5f8a065af0f15b603b5 /src/backend/utils/cache
parent546371599e767340599cdff3e276728016e560cc (diff)
Remove pg_attribute.attcacheoff column
The column is no longer needed as the offset is now cached in the CompactAttribute struct per commit 5983a4cff. Author: David Rowley Reviewed-by: Andres Freund, Victor Yegorov Discussion: https://postgr.es/m/CAApHDvrBztXP3yx=NKNmo3xwFAFhEdyPnvrDg3=M0RhDs+4vYw@mail.gmail.com
Diffstat (limited to 'src/backend/utils/cache')
-rw-r--r--src/backend/utils/cache/relcache.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c
index 5658e4accbd..1ce7eb9da8f 100644
--- a/src/backend/utils/cache/relcache.c
+++ b/src/backend/utils/cache/relcache.c
@@ -662,19 +662,6 @@ RelationBuildTupleDesc(Relation relation)
need, RelationGetRelid(relation));
/*
- * The attcacheoff values we read from pg_attribute should all be -1
- * ("unknown"). Verify this if assert checking is on.
- */
-#ifdef USE_ASSERT_CHECKING
- {
- int i;
-
- for (i = 0; i < RelationGetNumberOfAttributes(relation); i++)
- Assert(TupleDescAttr(relation->rd_att, i)->attcacheoff == -1);
- }
-#endif
-
- /*
* We can easily set the attcacheoff value for the first attribute: it
* must be zero. This eliminates the need for special cases for attnum=1
* that used to exist in fastgetattr() and index_getattr().
@@ -1964,8 +1951,6 @@ formrdesc(const char *relationName, Oid relationReltype,
&attrs[i],
ATTRIBUTE_FIXED_PART_SIZE);
has_not_null |= attrs[i].attnotnull;
- /* make sure attcacheoff is valid */
- TupleDescAttr(relation->rd_att, i)->attcacheoff = -1;
populate_compact_attribute(relation->rd_att, i);
}
@@ -4401,8 +4386,6 @@ BuildHardcodedDescriptor(int natts, const FormData_pg_attribute *attrs)
for (i = 0; i < natts; i++)
{
memcpy(TupleDescAttr(result, i), &attrs[i], ATTRIBUTE_FIXED_PART_SIZE);
- /* make sure attcacheoff is valid */
- TupleDescAttr(result, i)->attcacheoff = -1;
populate_compact_attribute(result, i);
}