@@ -106,20 +106,20 @@ typedef struct
106106/* non-export function prototypes */
107107static bool relationHasPrimaryKey (Relation rel );
108108static TupleDesc ConstructTupleDescriptor (Relation heapRelation ,
109- IndexInfo * indexInfo ,
110- List * indexColNames ,
109+ const IndexInfo * indexInfo ,
110+ const List * indexColNames ,
111111 Oid accessMethodObjectId ,
112- Oid * collationObjectId ,
113- Oid * classObjectId );
112+ const Oid * collationObjectId ,
113+ const Oid * classObjectId );
114114static void InitializeAttributeOids (Relation indexRelation ,
115115 int numatts , Oid indexoid );
116- static void AppendAttributeTuples (Relation indexRelation , Datum * attopts );
116+ static void AppendAttributeTuples (Relation indexRelation , const Datum * attopts );
117117static void UpdateIndexRelation (Oid indexoid , Oid heapoid ,
118118 Oid parentIndexId ,
119- IndexInfo * indexInfo ,
120- Oid * collationOids ,
121- Oid * classOids ,
122- int16 * coloptions ,
119+ const IndexInfo * indexInfo ,
120+ const Oid * collationOids ,
121+ const Oid * classOids ,
122+ const int16 * coloptions ,
123123 bool primary ,
124124 bool isexclusion ,
125125 bool immediate ,
@@ -205,9 +205,9 @@ relationHasPrimaryKey(Relation rel)
205205 */
206206void
207207index_check_primary_key (Relation heapRel ,
208- IndexInfo * indexInfo ,
208+ const IndexInfo * indexInfo ,
209209 bool is_alter_table ,
210- IndexStmt * stmt )
210+ const IndexStmt * stmt )
211211{
212212 int i ;
213213
@@ -284,11 +284,11 @@ index_check_primary_key(Relation heapRel,
284284 */
285285static TupleDesc
286286ConstructTupleDescriptor (Relation heapRelation ,
287- IndexInfo * indexInfo ,
288- List * indexColNames ,
287+ const IndexInfo * indexInfo ,
288+ const List * indexColNames ,
289289 Oid accessMethodObjectId ,
290- Oid * collationObjectId ,
291- Oid * classObjectId )
290+ const Oid * collationObjectId ,
291+ const Oid * classObjectId )
292292{
293293 int numatts = indexInfo -> ii_NumIndexAttrs ;
294294 int numkeyatts = indexInfo -> ii_NumIndexKeyAttrs ;
@@ -516,7 +516,7 @@ InitializeAttributeOids(Relation indexRelation,
516516 * ----------------------------------------------------------------
517517 */
518518static void
519- AppendAttributeTuples (Relation indexRelation , Datum * attopts )
519+ AppendAttributeTuples (Relation indexRelation , const Datum * attopts )
520520{
521521 Relation pg_attribute ;
522522 CatalogIndexState indstate ;
@@ -551,10 +551,10 @@ static void
551551UpdateIndexRelation (Oid indexoid ,
552552 Oid heapoid ,
553553 Oid parentIndexId ,
554- IndexInfo * indexInfo ,
555- Oid * collationOids ,
556- Oid * classOids ,
557- int16 * coloptions ,
554+ const IndexInfo * indexInfo ,
555+ const Oid * collationOids ,
556+ const Oid * classOids ,
557+ const int16 * coloptions ,
558558 bool primary ,
559559 bool isexclusion ,
560560 bool immediate ,
@@ -718,12 +718,12 @@ index_create(Relation heapRelation,
718718 Oid parentConstraintId ,
719719 RelFileNumber relFileNumber ,
720720 IndexInfo * indexInfo ,
721- List * indexColNames ,
721+ const List * indexColNames ,
722722 Oid accessMethodObjectId ,
723723 Oid tableSpaceId ,
724- Oid * collationObjectId ,
725- Oid * classObjectId ,
726- int16 * coloptions ,
724+ const Oid * collationObjectId ,
725+ const Oid * classObjectId ,
726+ const int16 * coloptions ,
727727 Datum reloptions ,
728728 bits16 flags ,
729729 bits16 constr_flags ,
@@ -1908,7 +1908,7 @@ ObjectAddress
19081908index_constraint_create (Relation heapRelation ,
19091909 Oid indexRelationId ,
19101910 Oid parentConstraintId ,
1911- IndexInfo * indexInfo ,
1911+ const IndexInfo * indexInfo ,
19121912 const char * constraintName ,
19131913 char constraintType ,
19141914 bits16 constr_flags ,
@@ -2537,10 +2537,10 @@ BuildDummyIndexInfo(Relation index)
25372537 * Use build_attrmap_by_name(index2, index1) to build the attmap.
25382538 */
25392539bool
2540- CompareIndexInfo (IndexInfo * info1 , IndexInfo * info2 ,
2541- Oid * collations1 , Oid * collations2 ,
2542- Oid * opfamilies1 , Oid * opfamilies2 ,
2543- AttrMap * attmap )
2540+ CompareIndexInfo (const IndexInfo * info1 , const IndexInfo * info2 ,
2541+ const Oid * collations1 , const Oid * collations2 ,
2542+ const Oid * opfamilies1 , const Oid * opfamilies2 ,
2543+ const AttrMap * attmap )
25442544{
25452545 int i ;
25462546
@@ -3559,7 +3559,7 @@ IndexGetRelation(Oid indexId, bool missing_ok)
35593559 */
35603560void
35613561reindex_index (Oid indexId , bool skip_constraint_checks , char persistence ,
3562- ReindexParams * params )
3562+ const ReindexParams * params )
35633563{
35643564 Relation iRel ,
35653565 heapRelation ;
@@ -3872,7 +3872,7 @@ reindex_index(Oid indexId, bool skip_constraint_checks, char persistence,
38723872 * index rebuild.
38733873 */
38743874bool
3875- reindex_relation (Oid relid , int flags , ReindexParams * params )
3875+ reindex_relation (Oid relid , int flags , const ReindexParams * params )
38763876{
38773877 Relation rel ;
38783878 Oid toast_relid ;
@@ -4177,9 +4177,9 @@ SerializeReindexState(Size maxsize, char *start_address)
41774177 * Restore reindex state in a parallel worker.
41784178 */
41794179void
4180- RestoreReindexState (void * reindexstate )
4180+ RestoreReindexState (const void * reindexstate )
41814181{
4182- SerializedReindexState * sistate = (SerializedReindexState * ) reindexstate ;
4182+ const SerializedReindexState * sistate = (const SerializedReindexState * ) reindexstate ;
41834183 int c = 0 ;
41844184 MemoryContext oldcontext ;
41854185
0 commit comments