From c9a8a401f169ec793b1a89b71b0340dd2cfe8bd7 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 20 Sep 2018 17:21:14 -0400 Subject: [PATCH] Fix psql's tab completion for TABLE. This should offer the same relation types that SELECT ... FROM would. You can't select from an index for instance, so offering it here is unhelpful. Noted while testing ilmari's recent patch. --- src/bin/psql/tab-complete.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index 3d627c10a1..47a1a19688 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -3327,7 +3327,7 @@ psql_completion(const char *text, int start, int end) /* TABLE, but not TABLE embedded in other commands */ else if (Matches1("TABLE")) - COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_relations, NULL); + COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_tsvmf, NULL); /* TABLESAMPLE */ else if (TailMatches1("TABLESAMPLE"))