Re: Proposal to Enable/Disable Index using ALTER INDEX (with patch)

From: Benoit Lobréau <benoit(dot)lobreau(at)gmail(dot)com>
To: Shayon Mukherjee <shayonj(at)gmail(dot)com>
Cc: Sami Imseih <samimseih(at)gmail(dot)com>, Michail Nikolaev <michail(dot)nikolaev(at)gmail(dot)com>, David Rowley <dgrowleyml(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Proposal to Enable/Disable Index using ALTER INDEX (with patch)
Date: 2025-01-24 14:20:19
Message-ID: CAPE8EZ5H8L19qqV0RNEU5cFcrfHaSPLm90pmgR59m8sq0p7Bcg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jan 24, 2025 at 11:32 AM Benoit Lobréau
<benoit(dot)lobreau(at)gmail(dot)com> wrote:
> The completion for the INVISIBLE / VISIBLE keyword is missing in psql.

I think this should to the trick ?

diff --git a/src/bin/psql/tab-complete.in.c b/src/bin/psql/tab-complete.in.c
index 81cbf10aa28..43ea8e55fd0 100644
--- a/src/bin/psql/tab-complete.in.c
+++ b/src/bin/psql/tab-complete.in.c
@@ -2393,7 +2393,8 @@ match_previous_words(int pattern_id,
else if (Matches("ALTER", "INDEX", MatchAny))
COMPLETE_WITH("ALTER COLUMN", "OWNER TO", "RENAME TO", "SET",
"RESET", "ATTACH PARTITION",
- "DEPENDS ON EXTENSION", "NO
DEPENDS ON EXTENSION");
+ "DEPENDS ON EXTENSION", "NO
DEPENDS ON EXTENSION",
+ "INVISIBLE", "VISIBLE");
else if (Matches("ALTER", "INDEX", MatchAny, "ATTACH"))
COMPLETE_WITH("PARTITION");
else if (Matches("ALTER", "INDEX", MatchAny, "ATTACH", "PARTITION"))

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bertrand Drouvot 2025-01-24 14:20:24 Re: Show WAL write and fsync stats in pg_stat_io
Previous Message Melanie Plageman 2025-01-24 14:15:28 Re: Eagerly scan all-visible pages to amortize aggressive vacuum