@@ -108,17 +108,17 @@ static bool relationHasPrimaryKey(Relation rel);
108
108
static TupleDesc ConstructTupleDescriptor (Relation heapRelation ,
109
109
const IndexInfo * indexInfo ,
110
110
const List * indexColNames ,
111
- Oid accessMethodObjectId ,
112
- const Oid * collationObjectId ,
113
- const Oid * classObjectId );
111
+ Oid accessMethodId ,
112
+ const Oid * collationIds ,
113
+ const Oid * opclassIds );
114
114
static void InitializeAttributeOids (Relation indexRelation ,
115
115
int numatts ,Oid indexoid );
116
116
static void AppendAttributeTuples (Relation indexRelation ,const Datum * attopts );
117
117
static void UpdateIndexRelation (Oid indexoid ,Oid heapoid ,
118
118
Oid parentIndexId ,
119
119
const IndexInfo * indexInfo ,
120
120
const Oid * collationOids ,
121
- const Oid * classOids ,
121
+ const Oid * opclassOids ,
122
122
const int16 * coloptions ,
123
123
bool primary ,
124
124
bool isexclusion ,
@@ -286,9 +286,9 @@ static TupleDesc
286
286
ConstructTupleDescriptor (Relation heapRelation ,
287
287
const IndexInfo * indexInfo ,
288
288
const List * indexColNames ,
289
- Oid accessMethodObjectId ,
290
- const Oid * collationObjectId ,
291
- const Oid * classObjectId )
289
+ Oid accessMethodId ,
290
+ const Oid * collationIds ,
291
+ const Oid * opclassIds )
292
292
{
293
293
int numatts = indexInfo -> ii_NumIndexAttrs ;
294
294
int numkeyatts = indexInfo -> ii_NumIndexKeyAttrs ;
@@ -301,7 +301,7 @@ ConstructTupleDescriptor(Relation heapRelation,
301
301
int i ;
302
302
303
303
/* We need access to the index AM's API struct */
304
- amroutine = GetIndexAmRoutineByAmId (accessMethodObjectId , false);
304
+ amroutine = GetIndexAmRoutineByAmId (accessMethodId , false);
305
305
306
306
/* ... and to the table's tuple descriptor */
307
307
heapTupDesc = RelationGetDescr (heapRelation );
@@ -330,7 +330,7 @@ ConstructTupleDescriptor(Relation heapRelation,
330
330
to -> attcacheoff = -1 ;
331
331
to -> attislocal = true;
332
332
to -> attcollation = (i < numkeyatts ) ?
333
- collationObjectId [i ] :InvalidOid ;
333
+ collationIds [i ] :InvalidOid ;
334
334
335
335
/*
336
336
* Set the attribute name as specified by caller.
@@ -436,10 +436,10 @@ ConstructTupleDescriptor(Relation heapRelation,
436
436
437
437
if (i < indexInfo -> ii_NumIndexKeyAttrs )
438
438
{
439
- tuple = SearchSysCache1 (CLAOID ,ObjectIdGetDatum (classObjectId [i ]));
439
+ tuple = SearchSysCache1 (CLAOID ,ObjectIdGetDatum (opclassIds [i ]));
440
440
if (!HeapTupleIsValid (tuple ))
441
441
elog (ERROR ,"cache lookup failed for opclass %u" ,
442
- classObjectId [i ]);
442
+ opclassIds [i ]);
443
443
opclassTup = (Form_pg_opclass )GETSTRUCT (tuple );
444
444
if (OidIsValid (opclassTup -> opckeytype ))
445
445
keyType = opclassTup -> opckeytype ;
@@ -553,7 +553,7 @@ UpdateIndexRelation(Oid indexoid,
553
553
Oid parentIndexId ,
554
554
const IndexInfo * indexInfo ,
555
555
const Oid * collationOids ,
556
- const Oid * classOids ,
556
+ const Oid * opclassOids ,
557
557
const int16 * coloptions ,
558
558
bool primary ,
559
559
bool isexclusion ,
@@ -581,7 +581,7 @@ UpdateIndexRelation(Oid indexoid,
581
581
for (i = 0 ;i < indexInfo -> ii_NumIndexAttrs ;i ++ )
582
582
indkey -> values [i ]= indexInfo -> ii_IndexAttrNumbers [i ];
583
583
indcollation = buildoidvector (collationOids ,indexInfo -> ii_NumIndexKeyAttrs );
584
- indclass = buildoidvector (classOids ,indexInfo -> ii_NumIndexKeyAttrs );
584
+ indclass = buildoidvector (opclassOids ,indexInfo -> ii_NumIndexKeyAttrs );
585
585
indoption = buildint2vector (coloptions ,indexInfo -> ii_NumIndexKeyAttrs );
586
586
587
587
/*
@@ -679,10 +679,10 @@ UpdateIndexRelation(Oid indexoid,
679
679
*May be nonzero to attach an existing valid build.
680
680
* indexInfo: same info executor uses to insert into the index
681
681
* 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
683
683
* 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
686
686
* coloptions: array of per-index-column indoption settings
687
687
* reloptions: AM-specific options
688
688
* flags: bitmask that can include any combination of these bits:
@@ -719,10 +719,10 @@ index_create(Relation heapRelation,
719
719
RelFileNumber relFileNumber ,
720
720
IndexInfo * indexInfo ,
721
721
const List * indexColNames ,
722
- Oid accessMethodObjectId ,
722
+ Oid accessMethodId ,
723
723
Oid tableSpaceId ,
724
- const Oid * collationObjectId ,
725
- const Oid * classObjectId ,
724
+ const Oid * collationIds ,
725
+ const Oid * opclassIds ,
726
726
const int16 * coloptions ,
727
727
Datum reloptions ,
728
728
bits16 flags ,
@@ -806,8 +806,8 @@ index_create(Relation heapRelation,
806
806
*/
807
807
for (i = 0 ;i < indexInfo -> ii_NumIndexKeyAttrs ;i ++ )
808
808
{
809
- Oid collation = collationObjectId [i ];
810
- Oid opclass = classObjectId [i ];
809
+ Oid collation = collationIds [i ];
810
+ Oid opclass = opclassIds [i ];
811
811
812
812
if (collation )
813
813
{
@@ -908,9 +908,9 @@ index_create(Relation heapRelation,
908
908
indexTupDesc = ConstructTupleDescriptor (heapRelation ,
909
909
indexInfo ,
910
910
indexColNames ,
911
- accessMethodObjectId ,
912
- collationObjectId ,
913
- classObjectId );
911
+ accessMethodId ,
912
+ collationIds ,
913
+ opclassIds );
914
914
915
915
/*
916
916
* Allocate an OID for the index, unless we were told what to use.
@@ -964,7 +964,7 @@ index_create(Relation heapRelation,
964
964
tableSpaceId ,
965
965
indexRelationId ,
966
966
relFileNumber ,
967
- accessMethodObjectId ,
967
+ accessMethodId ,
968
968
indexTupDesc ,
969
969
relkind ,
970
970
relpersistence ,
@@ -993,7 +993,7 @@ index_create(Relation heapRelation,
993
993
* XXX should have a cleaner way to create cataloged indexes
994
994
*/
995
995
indexRelation -> rd_rel -> relowner = heapRelation -> rd_rel -> relowner ;
996
- indexRelation -> rd_rel -> relam = accessMethodObjectId ;
996
+ indexRelation -> rd_rel -> relam = accessMethodId ;
997
997
indexRelation -> rd_rel -> relispartition = OidIsValid (parentIndexRelid );
998
998
999
999
/*
@@ -1030,7 +1030,7 @@ index_create(Relation heapRelation,
1030
1030
*/
1031
1031
UpdateIndexRelation (indexRelationId ,heapRelationId ,parentIndexRelid ,
1032
1032
indexInfo ,
1033
- collationObjectId , classObjectId ,coloptions ,
1033
+ collationIds , opclassIds ,coloptions ,
1034
1034
isprimary ,is_exclusion ,
1035
1035
(constr_flags & INDEX_CONSTR_CREATE_DEFERRABLE )== 0 ,
1036
1036
!concurrent && !invalid ,
@@ -1159,19 +1159,19 @@ index_create(Relation heapRelation,
1159
1159
/* The default collation is pinned, so don't bother recording it */
1160
1160
for (i = 0 ;i < indexInfo -> ii_NumIndexKeyAttrs ;i ++ )
1161
1161
{
1162
- if (OidIsValid (collationObjectId [i ])&&
1163
- collationObjectId [i ]!= DEFAULT_COLLATION_OID )
1162
+ if (OidIsValid (collationIds [i ])&&
1163
+ collationIds [i ]!= DEFAULT_COLLATION_OID )
1164
1164
{
1165
1165
ObjectAddressSet (referenced ,CollationRelationId ,
1166
- collationObjectId [i ]);
1166
+ collationIds [i ]);
1167
1167
add_exact_object_address (& referenced ,addrs );
1168
1168
}
1169
1169
}
1170
1170
1171
1171
/* Store dependency on operator classes */
1172
1172
for (i = 0 ;i < indexInfo -> ii_NumIndexKeyAttrs ;i ++ )
1173
1173
{
1174
- ObjectAddressSet (referenced ,OperatorClassRelationId ,classObjectId [i ]);
1174
+ ObjectAddressSet (referenced ,OperatorClassRelationId ,opclassIds [i ]);
1175
1175
add_exact_object_address (& referenced ,addrs );
1176
1176
}
1177
1177