Skip to content

Commit 3cf2f7a

Browse files
committed
Improve tab completion for ALTER STATISTICS <name> SET in psql
The code was completing this pattern with a list of settable characters, and it was possible to reach this state after completing a "ALTER STATISTICS <name>" with SET. Author: Vignesh C Discussion: https://postgr.es/m/CALDaNm2HHF_371o+EeSjxDDS17Cx7d-ko2h1fLU94=ob=4_ktg@mail.gmail.com
1 parent 14a737b commit 3cf2f7a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/bin/psql/tab-complete.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2216,6 +2216,9 @@ psql_completion(const char *text, int start, int end)
22162216
/* ALTER STATISTICS <name> */
22172217
else if (Matches("ALTER", "STATISTICS", MatchAny))
22182218
COMPLETE_WITH("OWNER TO", "RENAME TO", "SET SCHEMA", "SET STATISTICS");
2219+
/* ALTER STATISTICS <name> SET */
2220+
else if (Matches("ALTER", "STATISTICS", MatchAny, "SET"))
2221+
COMPLETE_WITH("SCHEMA", "STATISTICS");
22192222

22202223
/* ALTER TRIGGER <name>, add ON */
22212224
else if (Matches("ALTER", "TRIGGER", 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