TABLE tab completion
Started by Vik Fearingover 7 years ago3 messages
The tab completion for the TABLE command includes indexes but that's a
bug. Attached is a trivial patch to fix it.
--
Vik Fearing +33 6 46 75 15 36
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support
Attachments:
TABLE_tab-complete.patchtext/x-patch; name=TABLE_tab-complete.patchDownload
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
index 7bb47eadc6..787eeb26be 100644
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -3517,7 +3517,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"))
Re: TABLE tab completion
On 29 May 2018 at 07:28, Vik Fearing <vik.fearing@2ndquadrant.com> wrote:
The tab completion for the TABLE command includes indexes but that's a
bug. Attached is a trivial patch to fix it.
Looks correct to me.
You lose tab completion for "TABLE pg_toast.pg_toast_xyz" but that
seems reasonable. If people want to query toast tables I'm sure
they'll manage.