summaryrefslogtreecommitdiff
path: root/src/backend/utils/cache/relcache.c
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2019-01-21 17:36:55 -0800
committerAndres Freund <andres@anarazel.de>2019-01-21 17:36:55 -0800
commit346ed70b0ad7efc574711a97812692dab4542712 (patch)
treedf7dfc97f786c3ed0e8ed841be5dd8304ea0ca0d /src/backend/utils/cache/relcache.c
parentebcc7bf949bae614cccc6b86e3ef9b926a6e2f99 (diff)
Rename RelationData.rd_amroutine to rd_indam.
The upcoming table AM support makes rd_amroutine to generic, as its only about index AMs. The new name makes that clear, and is shorter to boot. Author: Andres Freund Discussion: https://postgr.es/m/20180703070645.wchpu5muyto5n647@alap3.anarazel.de
Diffstat (limited to 'src/backend/utils/cache/relcache.c')
-rw-r--r--src/backend/utils/cache/relcache.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c
index 6ee06210087..bcf4f104cf6 100644
--- a/src/backend/utils/cache/relcache.c
+++ b/src/backend/utils/cache/relcache.c
@@ -426,7 +426,7 @@ AllocateRelationDesc(Form_pg_class relp)
*
* tuple is the real pg_class tuple (not rd_rel!) for relation
*
- * Note: rd_rel and (if an index) rd_amroutine must be valid already
+ * Note: rd_rel and (if an index) rd_indam must be valid already
*/
static void
RelationParseRelOptions(Relation relation, HeapTuple tuple)
@@ -451,7 +451,7 @@ RelationParseRelOptions(Relation relation, HeapTuple tuple)
break;
case RELKIND_INDEX:
case RELKIND_PARTITIONED_INDEX:
- amoptsfn = relation->rd_amroutine->amoptions;
+ amoptsfn = relation->rd_indam->amoptions;
break;
default:
return;
@@ -1331,7 +1331,7 @@ InitIndexAmRoutine(Relation relation)
cached = (IndexAmRoutine *) MemoryContextAlloc(relation->rd_indexcxt,
sizeof(IndexAmRoutine));
memcpy(cached, tmp, sizeof(IndexAmRoutine));
- relation->rd_amroutine = cached;
+ relation->rd_indam = cached;
pfree(tmp);
}
@@ -1416,7 +1416,7 @@ RelationInitIndexAccessInfo(Relation relation)
relation->rd_opcintype = (Oid *)
MemoryContextAllocZero(indexcxt, indnkeyatts * sizeof(Oid));
- amsupport = relation->rd_amroutine->amsupport;
+ amsupport = relation->rd_indam->amsupport;
if (amsupport > 0)
{
int nsupport = indnatts * amsupport;
@@ -5404,7 +5404,7 @@ load_relcache_init_file(bool shared)
rel->rd_indoption = indoption;
/* set up zeroed fmgr-info vector */
- nsupport = relform->relnatts * rel->rd_amroutine->amsupport;
+ nsupport = relform->relnatts * rel->rd_indam->amsupport;
rel->rd_supportinfo = (FmgrInfo *)
MemoryContextAllocZero(indexcxt, nsupport * sizeof(FmgrInfo));
}
@@ -5417,7 +5417,7 @@ load_relcache_init_file(bool shared)
Assert(rel->rd_index == NULL);
Assert(rel->rd_indextuple == NULL);
Assert(rel->rd_indexcxt == NULL);
- Assert(rel->rd_amroutine == NULL);
+ Assert(rel->rd_indam == NULL);
Assert(rel->rd_opfamily == NULL);
Assert(rel->rd_opcintype == NULL);
Assert(rel->rd_support == NULL);
@@ -5695,7 +5695,7 @@ write_relcache_init_file(bool shared)
/* next, write the vector of support procedure OIDs */
write_item(rel->rd_support,
- relform->relnatts * (rel->rd_amroutine->amsupport * sizeof(RegProcedure)),
+ relform->relnatts * (rel->rd_indam->amsupport * sizeof(RegProcedure)),
fp);
/* next, write the vector of collation OIDs */