Re: PATCH: Add REINDEX tag to event triggers - Mailing list pgsql-hackers

From Jim Jones
Subject Re: PATCH: Add REINDEX tag to event triggers
Date
Msg-id 9c5942ec-5c11-03b0-6611-8336044a5219@uni-muenster.de
Whole thread Raw
In response to Re: PATCH: Add REINDEX tag to event triggers  (jian he <jian.universality@gmail.com>)
Responses Re: PATCH: Add REINDEX tag to event triggers
List pgsql-hackers
On 01.09.23 11:23, jian he wrote:
> because the change made in here:
>
https://git.postgresql.org/cgit/postgresql.git/diff/src/backend/commands/indexcmds.c?id=11af63fb48d278b86aa948a5b57f136ef03c2bb7
>
> I manually slight edited the patch content:
> from
>   static List *ChooseIndexColumnNames(List *indexElems);
>   static void ReindexIndex(RangeVar *indexRelation, ReindexParams *params,
>    bool isTopLevel);
> to
> static List *ChooseIndexColumnNames(const List *indexElems);
> static void ReindexIndex(const RangeVar *indexRelation, const
> ReindexParams *params,
> bool isTopLevel);
>
> can you try the attached one.

The patch applies cleanly. However, now the compiler complains about a 
qualifier mismatch

indexcmds.c:2707:33: warning: assignment discards ‘const’ qualifier from 
pointer target type [-Wdiscarded-qualifiers]
  2707 |         currentReindexStatement = stmt;


Perhaps 'const ReindexStmt *currentReindexStatement'?

Tests also work just fine. I also tested it against unique and partial 
indexes, and it worked as expected.

Jim




pgsql-hackers by date:

Previous
From: "Zhijie Hou (Fujitsu)"
Date:
Subject: Fix a typo in decode.c
Next
From: Michael Paquier
Date:
Subject: Re: Show inline comments from pg_hba lines in the pg_hba_file_rules view