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
pull/142/head
Michael Paquier 2 years ago
parent 97957fdbaa
commit d16eb83aba
  1. 6
      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("\\?"))

Loading…
Cancel
Save