@@ -108,17 +108,17 @@ static bool relationHasPrimaryKey(Relation rel);
108108static TupleDesc ConstructTupleDescriptor (Relation heapRelation ,
109109const IndexInfo * indexInfo ,
110110const List * indexColNames ,
111- Oid accessMethodObjectId ,
112- const Oid * collationObjectId ,
113- const Oid * classObjectId );
111+ Oid accessMethodId ,
112+ const Oid * collationIds ,
113+ const Oid * opclassIds );
114114static void InitializeAttributeOids (Relation indexRelation ,
115115int numatts ,Oid indexoid );
116116static void AppendAttributeTuples (Relation indexRelation ,const Datum * attopts );
117117static void UpdateIndexRelation (Oid indexoid ,Oid heapoid ,
118118Oid parentIndexId ,
119119const IndexInfo * indexInfo ,
120120const Oid * collationOids ,
121- const Oid * classOids ,
121+ const Oid * opclassOids ,
122122const int16 * coloptions ,
123123bool primary ,
124124bool isexclusion ,
@@ -286,9 +286,9 @@ static TupleDesc
286286ConstructTupleDescriptor (Relation heapRelation ,
287287const IndexInfo * indexInfo ,
288288const List * indexColNames ,
289- Oid accessMethodObjectId ,
290- const Oid * collationObjectId ,
291- const Oid * classObjectId )
289+ Oid accessMethodId ,
290+ const Oid * collationIds ,
291+ const Oid * opclassIds )
292292{
293293int numatts = indexInfo -> ii_NumIndexAttrs ;
294294int numkeyatts = indexInfo -> ii_NumIndexKeyAttrs ;
@@ -301,7 +301,7 @@ ConstructTupleDescriptor(Relation heapRelation,
301301int i ;
302302
303303/* We need access to the index AM's API struct */
304- amroutine = GetIndexAmRoutineByAmId (accessMethodObjectId , false);
304+ amroutine = GetIndexAmRoutineByAmId (accessMethodId , false);
305305
306306/* ... and to the table's tuple descriptor */
307307heapTupDesc = RelationGetDescr (heapRelation );
@@ -330,7 +330,7 @@ ConstructTupleDescriptor(Relation heapRelation,
330330to -> attcacheoff = -1 ;
331331to -> attislocal = true;
332332to -> attcollation = (i < numkeyatts ) ?
333- collationObjectId [i ] :InvalidOid ;
333+ collationIds [i ] :InvalidOid ;
334334
335335/*
336336 * Set the attribute name as specified by caller.
@@ -436,10 +436,10 @@ ConstructTupleDescriptor(Relation heapRelation,
436436
437437if (i < indexInfo -> ii_NumIndexKeyAttrs )
438438{
439- tuple = SearchSysCache1 (CLAOID ,ObjectIdGetDatum (classObjectId [i ]));
439+ tuple = SearchSysCache1 (CLAOID ,ObjectIdGetDatum (opclassIds [i ]));
440440if (!HeapTupleIsValid (tuple ))
441441elog (ERROR ,"cache lookup failed for opclass %u" ,
442- classObjectId [i ]);
442+ opclassIds [i ]);
443443opclassTup = (Form_pg_opclass )GETSTRUCT (tuple );
444444if (OidIsValid (opclassTup -> opckeytype ))
445445keyType = opclassTup -> opckeytype ;
@@ -553,7 +553,7 @@ UpdateIndexRelation(Oid indexoid,
553553Oid parentIndexId ,
554554const IndexInfo * indexInfo ,
555555const Oid * collationOids ,
556- const Oid * classOids ,
556+ const Oid * opclassOids ,
557557const int16 * coloptions ,
558558bool primary ,
559559bool isexclusion ,
@@ -581,7 +581,7 @@ UpdateIndexRelation(Oid indexoid,
581581for (i = 0 ;i < indexInfo -> ii_NumIndexAttrs ;i ++ )
582582indkey -> values [i ]= indexInfo -> ii_IndexAttrNumbers [i ];
583583indcollation = buildoidvector (collationOids ,indexInfo -> ii_NumIndexKeyAttrs );
584- indclass = buildoidvector (classOids ,indexInfo -> ii_NumIndexKeyAttrs );
584+ indclass = buildoidvector (opclassOids ,indexInfo -> ii_NumIndexKeyAttrs );
585585indoption = buildint2vector (coloptions ,indexInfo -> ii_NumIndexKeyAttrs );
586586
587587/*
@@ -679,10 +679,10 @@ UpdateIndexRelation(Oid indexoid,
679679 *May be nonzero to attach an existing valid build.
680680 * indexInfo: same info executor uses to insert into the index
681681 * indexColNames: column names to use for index (List of char *)
682- *accessMethodObjectId : OID of index AM to use
682+ *accessMethodId : OID of index AM to use
683683 * tableSpaceId: OID of tablespace to use
684- *collationObjectId : array of collation OIDs, one per index column
685- *classObjectId : array of index opclass OIDs, one per index column
684+ *collationIds : array of collation OIDs, one per index column
685+ *opclassIds : array of index opclass OIDs, one per index column
686686 * coloptions: array of per-index-column indoption settings
687687 * reloptions: AM-specific options
688688 * flags: bitmask that can include any combination of these bits:
@@ -719,10 +719,10 @@ index_create(Relation heapRelation,
719719RelFileNumber relFileNumber ,
720720IndexInfo * indexInfo ,
721721const List * indexColNames ,
722- Oid accessMethodObjectId ,
722+ Oid accessMethodId ,
723723Oid tableSpaceId ,
724- const Oid * collationObjectId ,
725- const Oid * classObjectId ,
724+ const Oid * collationIds ,
725+ const Oid * opclassIds ,
726726const int16 * coloptions ,
727727Datum reloptions ,
728728bits16 flags ,
@@ -806,8 +806,8 @@ index_create(Relation heapRelation,
806806 */
807807for (i = 0 ;i < indexInfo -> ii_NumIndexKeyAttrs ;i ++ )
808808{
809- Oid collation = collationObjectId [i ];
810- Oid opclass = classObjectId [i ];
809+ Oid collation = collationIds [i ];
810+ Oid opclass = opclassIds [i ];
811811
812812if (collation )
813813{
@@ -908,9 +908,9 @@ index_create(Relation heapRelation,
908908indexTupDesc = ConstructTupleDescriptor (heapRelation ,
909909indexInfo ,
910910indexColNames ,
911- accessMethodObjectId ,
912- collationObjectId ,
913- classObjectId );
911+ accessMethodId ,
912+ collationIds ,
913+ opclassIds );
914914
915915/*
916916 * Allocate an OID for the index, unless we were told what to use.
@@ -964,7 +964,7 @@ index_create(Relation heapRelation,
964964tableSpaceId ,
965965indexRelationId ,
966966relFileNumber ,
967- accessMethodObjectId ,
967+ accessMethodId ,
968968indexTupDesc ,
969969relkind ,
970970relpersistence ,
@@ -993,7 +993,7 @@ index_create(Relation heapRelation,
993993 * XXX should have a cleaner way to create cataloged indexes
994994 */
995995indexRelation -> rd_rel -> relowner = heapRelation -> rd_rel -> relowner ;
996- indexRelation -> rd_rel -> relam = accessMethodObjectId ;
996+ indexRelation -> rd_rel -> relam = accessMethodId ;
997997indexRelation -> rd_rel -> relispartition = OidIsValid (parentIndexRelid );
998998
999999/*
@@ -1030,7 +1030,7 @@ index_create(Relation heapRelation,
10301030 */
10311031UpdateIndexRelation (indexRelationId ,heapRelationId ,parentIndexRelid ,
10321032indexInfo ,
1033- collationObjectId , classObjectId ,coloptions ,
1033+ collationIds , opclassIds ,coloptions ,
10341034isprimary ,is_exclusion ,
10351035(constr_flags & INDEX_CONSTR_CREATE_DEFERRABLE )== 0 ,
10361036!concurrent && !invalid ,
@@ -1159,19 +1159,19 @@ index_create(Relation heapRelation,
11591159/* The default collation is pinned, so don't bother recording it */
11601160for (i = 0 ;i < indexInfo -> ii_NumIndexKeyAttrs ;i ++ )
11611161{
1162- if (OidIsValid (collationObjectId [i ])&&
1163- collationObjectId [i ]!= DEFAULT_COLLATION_OID )
1162+ if (OidIsValid (collationIds [i ])&&
1163+ collationIds [i ]!= DEFAULT_COLLATION_OID )
11641164{
11651165ObjectAddressSet (referenced ,CollationRelationId ,
1166- collationObjectId [i ]);
1166+ collationIds [i ]);
11671167add_exact_object_address (& referenced ,addrs );
11681168}
11691169}
11701170
11711171/* Store dependency on operator classes */
11721172for (i = 0 ;i < indexInfo -> ii_NumIndexKeyAttrs ;i ++ )
11731173{
1174- ObjectAddressSet (referenced ,OperatorClassRelationId ,classObjectId [i ]);
1174+ ObjectAddressSet (referenced ,OperatorClassRelationId ,opclassIds [i ]);
11751175add_exact_object_address (& referenced ,addrs );
11761176}
11771177