diff options
| author | Michael Paquier <michael@paquier.xyz> | 2022-10-24 15:46:42 +0900 |
|---|---|---|
| committer | Michael Paquier <michael@paquier.xyz> | 2022-10-24 15:46:42 +0900 |
| commit | 3cf2f7af7f9b6198f3d518aaffb0ff4de340c5bc (patch) | |
| tree | 0b468e99b1dad0a58648b92280069912c91233d0 /src/bin/psql/tab-complete.c | |
| parent | 14a737bfdbe4f2328d7f333b207f52f9ed4ee722 (diff) | |
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
Diffstat (limited to 'src/bin/psql/tab-complete.c')
| -rw-r--r-- | src/bin/psql/tab-complete.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index 584d9d5ae64..a64571215b3 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -2216,6 +2216,9 @@ psql_completion(const char *text, int start, int end) /* ALTER STATISTICS <name> */ else if (Matches("ALTER", "STATISTICS", MatchAny)) COMPLETE_WITH("OWNER TO", "RENAME TO", "SET SCHEMA", "SET STATISTICS"); + /* ALTER STATISTICS <name> SET */ + else if (Matches("ALTER", "STATISTICS", MatchAny, "SET")) + COMPLETE_WITH("SCHEMA", "STATISTICS"); /* ALTER TRIGGER <name>, add ON */ else if (Matches("ALTER", "TRIGGER", MatchAny)) |
