@@ -106,20 +106,20 @@ typedef struct
106
106
/* non-export function prototypes */
107
107
static bool relationHasPrimaryKey (Relation rel );
108
108
static TupleDesc ConstructTupleDescriptor (Relation heapRelation ,
109
- IndexInfo * indexInfo ,
110
- List * indexColNames ,
109
+ const IndexInfo * indexInfo ,
110
+ const List * indexColNames ,
111
111
Oid accessMethodObjectId ,
112
- Oid * collationObjectId ,
113
- Oid * classObjectId );
112
+ const Oid * collationObjectId ,
113
+ const Oid * classObjectId );
114
114
static void InitializeAttributeOids (Relation indexRelation ,
115
115
int numatts , Oid indexoid );
116
- static void AppendAttributeTuples (Relation indexRelation , Datum * attopts );
116
+ static void AppendAttributeTuples (Relation indexRelation , const Datum * attopts );
117
117
static void UpdateIndexRelation (Oid indexoid , Oid heapoid ,
118
118
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 ,
123
123
bool primary ,
124
124
bool isexclusion ,
125
125
bool immediate ,
@@ -205,9 +205,9 @@ relationHasPrimaryKey(Relation rel)
205
205
*/
206
206
void
207
207
index_check_primary_key (Relation heapRel ,
208
- IndexInfo * indexInfo ,
208
+ const IndexInfo * indexInfo ,
209
209
bool is_alter_table ,
210
- IndexStmt * stmt )
210
+ const IndexStmt * stmt )
211
211
{
212
212
int i ;
213
213
@@ -284,11 +284,11 @@ index_check_primary_key(Relation heapRel,
284
284
*/
285
285
static TupleDesc
286
286
ConstructTupleDescriptor (Relation heapRelation ,
287
- IndexInfo * indexInfo ,
288
- List * indexColNames ,
287
+ const IndexInfo * indexInfo ,
288
+ const List * indexColNames ,
289
289
Oid accessMethodObjectId ,
290
- Oid * collationObjectId ,
291
- Oid * classObjectId )
290
+ const Oid * collationObjectId ,
291
+ const Oid * classObjectId )
292
292
{
293
293
int numatts = indexInfo -> ii_NumIndexAttrs ;
294
294
int numkeyatts = indexInfo -> ii_NumIndexKeyAttrs ;
@@ -516,7 +516,7 @@ InitializeAttributeOids(Relation indexRelation,
516
516
* ----------------------------------------------------------------
517
517
*/
518
518
static void
519
- AppendAttributeTuples (Relation indexRelation , Datum * attopts )
519
+ AppendAttributeTuples (Relation indexRelation , const Datum * attopts )
520
520
{
521
521
Relation pg_attribute ;
522
522
CatalogIndexState indstate ;
@@ -551,10 +551,10 @@ static void
551
551
UpdateIndexRelation (Oid indexoid ,
552
552
Oid heapoid ,
553
553
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 ,
558
558
bool primary ,
559
559
bool isexclusion ,
560
560
bool immediate ,
@@ -718,12 +718,12 @@ index_create(Relation heapRelation,
718
718
Oid parentConstraintId ,
719
719
RelFileNumber relFileNumber ,
720
720
IndexInfo * indexInfo ,
721
- List * indexColNames ,
721
+ const List * indexColNames ,
722
722
Oid accessMethodObjectId ,
723
723
Oid tableSpaceId ,
724
- Oid * collationObjectId ,
725
- Oid * classObjectId ,
726
- int16 * coloptions ,
724
+ const Oid * collationObjectId ,
725
+ const Oid * classObjectId ,
726
+ const int16 * coloptions ,
727
727
Datum reloptions ,
728
728
bits16 flags ,
729
729
bits16 constr_flags ,
@@ -1908,7 +1908,7 @@ ObjectAddress
1908
1908
index_constraint_create (Relation heapRelation ,
1909
1909
Oid indexRelationId ,
1910
1910
Oid parentConstraintId ,
1911
- IndexInfo * indexInfo ,
1911
+ const IndexInfo * indexInfo ,
1912
1912
const char * constraintName ,
1913
1913
char constraintType ,
1914
1914
bits16 constr_flags ,
@@ -2537,10 +2537,10 @@ BuildDummyIndexInfo(Relation index)
2537
2537
* Use build_attrmap_by_name(index2, index1) to build the attmap.
2538
2538
*/
2539
2539
bool
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 )
2544
2544
{
2545
2545
int i ;
2546
2546
@@ -3559,7 +3559,7 @@ IndexGetRelation(Oid indexId, bool missing_ok)
3559
3559
*/
3560
3560
void
3561
3561
reindex_index (Oid indexId , bool skip_constraint_checks , char persistence ,
3562
- ReindexParams * params )
3562
+ const ReindexParams * params )
3563
3563
{
3564
3564
Relation iRel ,
3565
3565
heapRelation ;
@@ -3872,7 +3872,7 @@ reindex_index(Oid indexId, bool skip_constraint_checks, char persistence,
3872
3872
* index rebuild.
3873
3873
*/
3874
3874
bool
3875
- reindex_relation (Oid relid , int flags , ReindexParams * params )
3875
+ reindex_relation (Oid relid , int flags , const ReindexParams * params )
3876
3876
{
3877
3877
Relation rel ;
3878
3878
Oid toast_relid ;
@@ -4177,9 +4177,9 @@ SerializeReindexState(Size maxsize, char *start_address)
4177
4177
* Restore reindex state in a parallel worker.
4178
4178
*/
4179
4179
void
4180
- RestoreReindexState (void * reindexstate )
4180
+ RestoreReindexState (const void * reindexstate )
4181
4181
{
4182
- SerializedReindexState * sistate = (SerializedReindexState * ) reindexstate ;
4182
+ const SerializedReindexState * sistate = (const SerializedReindexState * ) reindexstate ;
4183
4183
int c = 0 ;
4184
4184
MemoryContext oldcontext ;
4185
4185
0 commit comments