diff options
author | Michael Paquier <michael@paquier.xyz> | 2023-10-13 14:19:07 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2023-10-13 14:19:07 +0900 |
commit | d16eb83aba2e0abdc809ecffd51cc00a1beab7b8 (patch) | |
tree | 2115060a0e5fa3b9fbc21349787be90ab51c55d3 /src | |
parent | 97957fdbaa429c7c582d4753b108cb1e23e1b28a (diff) | |
download | postgresql-d16eb83aba2e0abdc809ecffd51cc00a1beab7b8.tar.gz postgresql-d16eb83aba2e0abdc809ecffd51cc00a1beab7b8.zip |
psql: Add completion support for AT [ LOCAL | TIME ZONE ]
AT TIME ZONE is completed with a list of supported timezones, something
not needed by AT LOCAL.
Author: Dagfinn Ilmari Mannsåker
Reviewed-by: Jim Jones
Discussion: https://postgr.es/m/87jzyzsvgv.fsf@wibble.ilmari.org
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/psql/tab-complete.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index d30d719a1f8..eb4dfe80b50 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -4682,6 +4682,12 @@ psql_completion(const char *text, int start, int end) else if (TailMatches("JOIN")) COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_selectables); +/* ... AT [ LOCAL | TIME ZONE ] ... */ + else if (TailMatches("AT")) + COMPLETE_WITH("LOCAL", "TIME ZONE"); + else if (TailMatches("AT", "TIME", "ZONE")) + COMPLETE_WITH_TIMEZONE_NAME(); + /* Backslash commands */ /* TODO: \dc \dd \dl */ else if (TailMatchesCS("\\?")) |