summaryrefslogtreecommitdiff
path: root/src/backend/catalog/index.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/catalog/index.c')
-rw-r--r--src/backend/catalog/index.c62
1 files changed, 31 insertions, 31 deletions
diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c
index 2a30eb3a32a..05b6f9ca1ab 100644
--- a/src/backend/catalog/index.c
+++ b/src/backend/catalog/index.c
@@ -108,9 +108,9 @@ static bool relationHasPrimaryKey(Relation rel);
static TupleDesc ConstructTupleDescriptor(Relation heapRelation,
const IndexInfo *indexInfo,
const List *indexColNames,
- Oid accessMethodObjectId,
- const Oid *collationObjectId,
- const Oid *classObjectId);
+ Oid accessMethodId,
+ const Oid *collationIds,
+ const Oid *opclassIds);
static void InitializeAttributeOids(Relation indexRelation,
int numatts, Oid indexoid);
static void AppendAttributeTuples(Relation indexRelation, const Datum *attopts);
@@ -118,7 +118,7 @@ static void UpdateIndexRelation(Oid indexoid, Oid heapoid,
Oid parentIndexId,
const IndexInfo *indexInfo,
const Oid *collationOids,
- const Oid *classOids,
+ const Oid *opclassOids,
const int16 *coloptions,
bool primary,
bool isexclusion,
@@ -286,9 +286,9 @@ static TupleDesc
ConstructTupleDescriptor(Relation heapRelation,
const IndexInfo *indexInfo,
const List *indexColNames,
- Oid accessMethodObjectId,
- const Oid *collationObjectId,
- const Oid *classObjectId)
+ Oid accessMethodId,
+ const Oid *collationIds,
+ const Oid *opclassIds)
{
int numatts = indexInfo->ii_NumIndexAttrs;
int numkeyatts = indexInfo->ii_NumIndexKeyAttrs;
@@ -301,7 +301,7 @@ ConstructTupleDescriptor(Relation heapRelation,
int i;
/* We need access to the index AM's API struct */
- amroutine = GetIndexAmRoutineByAmId(accessMethodObjectId, false);
+ amroutine = GetIndexAmRoutineByAmId(accessMethodId, false);
/* ... and to the table's tuple descriptor */
heapTupDesc = RelationGetDescr(heapRelation);
@@ -330,7 +330,7 @@ ConstructTupleDescriptor(Relation heapRelation,
to->attcacheoff = -1;
to->attislocal = true;
to->attcollation = (i < numkeyatts) ?
- collationObjectId[i] : InvalidOid;
+ collationIds[i] : InvalidOid;
/*
* Set the attribute name as specified by caller.
@@ -436,10 +436,10 @@ ConstructTupleDescriptor(Relation heapRelation,
if (i < indexInfo->ii_NumIndexKeyAttrs)
{
- tuple = SearchSysCache1(CLAOID, ObjectIdGetDatum(classObjectId[i]));
+ tuple = SearchSysCache1(CLAOID, ObjectIdGetDatum(opclassIds[i]));
if (!HeapTupleIsValid(tuple))
elog(ERROR, "cache lookup failed for opclass %u",
- classObjectId[i]);
+ opclassIds[i]);
opclassTup = (Form_pg_opclass) GETSTRUCT(tuple);
if (OidIsValid(opclassTup->opckeytype))
keyType = opclassTup->opckeytype;
@@ -553,7 +553,7 @@ UpdateIndexRelation(Oid indexoid,
Oid parentIndexId,
const IndexInfo *indexInfo,
const Oid *collationOids,
- const Oid *classOids,
+ const Oid *opclassOids,
const int16 *coloptions,
bool primary,
bool isexclusion,
@@ -581,7 +581,7 @@ UpdateIndexRelation(Oid indexoid,
for (i = 0; i < indexInfo->ii_NumIndexAttrs; i++)
indkey->values[i] = indexInfo->ii_IndexAttrNumbers[i];
indcollation = buildoidvector(collationOids, indexInfo->ii_NumIndexKeyAttrs);
- indclass = buildoidvector(classOids, indexInfo->ii_NumIndexKeyAttrs);
+ indclass = buildoidvector(opclassOids, indexInfo->ii_NumIndexKeyAttrs);
indoption = buildint2vector(coloptions, indexInfo->ii_NumIndexKeyAttrs);
/*
@@ -679,10 +679,10 @@ UpdateIndexRelation(Oid indexoid,
* May be nonzero to attach an existing valid build.
* indexInfo: same info executor uses to insert into the index
* indexColNames: column names to use for index (List of char *)
- * accessMethodObjectId: OID of index AM to use
+ * accessMethodId: OID of index AM to use
* tableSpaceId: OID of tablespace to use
- * collationObjectId: array of collation OIDs, one per index column
- * classObjectId: array of index opclass OIDs, one per index column
+ * collationIds: array of collation OIDs, one per index column
+ * opclassIds: array of index opclass OIDs, one per index column
* coloptions: array of per-index-column indoption settings
* reloptions: AM-specific options
* flags: bitmask that can include any combination of these bits:
@@ -719,10 +719,10 @@ index_create(Relation heapRelation,
RelFileNumber relFileNumber,
IndexInfo *indexInfo,
const List *indexColNames,
- Oid accessMethodObjectId,
+ Oid accessMethodId,
Oid tableSpaceId,
- const Oid *collationObjectId,
- const Oid *classObjectId,
+ const Oid *collationIds,
+ const Oid *opclassIds,
const int16 *coloptions,
Datum reloptions,
bits16 flags,
@@ -806,8 +806,8 @@ index_create(Relation heapRelation,
*/
for (i = 0; i < indexInfo->ii_NumIndexKeyAttrs; i++)
{
- Oid collation = collationObjectId[i];
- Oid opclass = classObjectId[i];
+ Oid collation = collationIds[i];
+ Oid opclass = opclassIds[i];
if (collation)
{
@@ -908,9 +908,9 @@ index_create(Relation heapRelation,
indexTupDesc = ConstructTupleDescriptor(heapRelation,
indexInfo,
indexColNames,
- accessMethodObjectId,
- collationObjectId,
- classObjectId);
+ accessMethodId,
+ collationIds,
+ opclassIds);
/*
* Allocate an OID for the index, unless we were told what to use.
@@ -964,7 +964,7 @@ index_create(Relation heapRelation,
tableSpaceId,
indexRelationId,
relFileNumber,
- accessMethodObjectId,
+ accessMethodId,
indexTupDesc,
relkind,
relpersistence,
@@ -993,7 +993,7 @@ index_create(Relation heapRelation,
* XXX should have a cleaner way to create cataloged indexes
*/
indexRelation->rd_rel->relowner = heapRelation->rd_rel->relowner;
- indexRelation->rd_rel->relam = accessMethodObjectId;
+ indexRelation->rd_rel->relam = accessMethodId;
indexRelation->rd_rel->relispartition = OidIsValid(parentIndexRelid);
/*
@@ -1030,7 +1030,7 @@ index_create(Relation heapRelation,
*/
UpdateIndexRelation(indexRelationId, heapRelationId, parentIndexRelid,
indexInfo,
- collationObjectId, classObjectId, coloptions,
+ collationIds, opclassIds, coloptions,
isprimary, is_exclusion,
(constr_flags & INDEX_CONSTR_CREATE_DEFERRABLE) == 0,
!concurrent && !invalid,
@@ -1159,11 +1159,11 @@ index_create(Relation heapRelation,
/* The default collation is pinned, so don't bother recording it */
for (i = 0; i < indexInfo->ii_NumIndexKeyAttrs; i++)
{
- if (OidIsValid(collationObjectId[i]) &&
- collationObjectId[i] != DEFAULT_COLLATION_OID)
+ if (OidIsValid(collationIds[i]) &&
+ collationIds[i] != DEFAULT_COLLATION_OID)
{
ObjectAddressSet(referenced, CollationRelationId,
- collationObjectId[i]);
+ collationIds[i]);
add_exact_object_address(&referenced, addrs);
}
}
@@ -1171,7 +1171,7 @@ index_create(Relation heapRelation,
/* Store dependency on operator classes */
for (i = 0; i < indexInfo->ii_NumIndexKeyAttrs; i++)
{
- ObjectAddressSet(referenced, OperatorClassRelationId, classObjectId[i]);
+ ObjectAddressSet(referenced, OperatorClassRelationId, opclassIds[i]);
add_exact_object_address(&referenced, addrs);
}