Re: [PATCH] Re: Proposal to Enable/Disable Index using ALTER INDEX - Mailing list pgsql-hackers

From Sami Imseih
Subject Re: [PATCH] Re: Proposal to Enable/Disable Index using ALTER INDEX
Date
Msg-id CAA5RZ0tvdenXt29KLECKVGMcN1S=N4Nw-6OEQxUDuu3Nm7+hMw@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Re: Proposal to Enable/Disable Index using ALTER INDEX  (Shayon Mukherjee <shayonj@gmail.com>)
Responses Re: [PATCH] Re: Proposal to Enable/Disable Index using ALTER INDEX
List pgsql-hackers
Thanks for the update!

The changes in v15 look good to me. The patch does need to be rebased,
and I also think you should add a tab-complete for CREATE INDEX


simseih@bcd07415af92 postgresql % git diff
diff --git a/src/bin/psql/tab-complete.in.c b/src/bin/psql/tab-complete.in.c
index 8e2eb50205e..f1853a68ccc 100644
--- a/src/bin/psql/tab-complete.in.c
+++ b/src/bin/psql/tab-complete.in.c
@@ -3434,6 +3434,8 @@ match_previous_words(int pattern_id,
                         !TailMatches("POLICY", MatchAny, MatchAny,
MatchAny, MatchAny, MatchAny) &&
                         !TailMatches("FOR", MatchAny, MatchAny, MatchAny))
                COMPLETE_WITH("(");
+       else if (TailMatches("*)"))
+               COMPLETE_WITH("VISIBLE", "INVISIBLE");

        /* CREATE OR REPLACE */
        else if (Matches("CREATE", "OR"))

IMO, with the above in place, this patch is RFC.

--
Sami Imseih
Amazon Web Services (AWS)



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [fixed] Trigger test
Next
From: Sami Imseih
Date:
Subject: Re: track generic and custom plans in pg_stat_statements