Skip to content

Commit 1e324cb

Browse files
committed
Add tab-completion for ALTER INDEX .. [NO] DEPENDS ON
... as added in the prior commit. (We'd like to have tab-completion for the other object types too, but they don't have sub-command completion yet.) Author: Ibrar Ahmed <ibrar.ahmad@gmail.com> Reviewed-by: Álvaro Herrera <alvherre@alvh.no-ip.org> Discussion: https://postgr.es/m/CALtqXTcogrFEVP9uou5vFtnGsn+vHZUu9+9a0inarfYVOHScYQ@mail.gmail.com
1 parent 5fc7039 commit 1e324cb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/bin/psql/tab-complete.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1709,7 +1709,7 @@ psql_completion(const char *text, int start, int end)
17091709
/* ALTER INDEX <name> */
17101710
else if (Matches("ALTER", "INDEX", MatchAny))
17111711
COMPLETE_WITH("ALTER COLUMN", "OWNER TO", "RENAME TO", "SET",
1712-
"RESET", "ATTACH PARTITION");
1712+
"RESET", "ATTACH PARTITION", "DEPENDS", "NO DEPENDS");
17131713
else if (Matches("ALTER", "INDEX", MatchAny, "ATTACH"))
17141714
COMPLETE_WITH("PARTITION");
17151715
else if (Matches("ALTER", "INDEX", MatchAny, "ATTACH", "PARTITION"))
@@ -1755,6 +1755,10 @@ psql_completion(const char *text, int start, int end)
17551755
"buffering =", /* GiST */
17561756
"pages_per_range =", "autosummarize =" /* BRIN */
17571757
);
1758+
else if (Matches("ALTER", "INDEX", MatchAny, "NO", "DEPENDS"))
1759+
COMPLETE_WITH("ON EXTENSION");
1760+
else if (Matches("ALTER", "INDEX", MatchAny, "DEPENDS"))
1761+
COMPLETE_WITH("ON EXTENSION");
17581762

17591763
/* ALTER LANGUAGE <name> */
17601764
else if (Matches("ALTER", "LANGUAGE", MatchAny))

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy