mirror of
https://github.com/postgres/postgres.git
synced 2025-05-02 11:44:50 +03:00
Make TABLE tab complation in psql include all relations
Not just tables, since views also work fine with the TABLE command.
This commit is contained in:
parent
8140c1bcf3
commit
a74a5f5913
@ -2657,6 +2657,11 @@ psql_completion(char *text, int start, int end)
|
|||||||
else if (pg_strcasecmp(prev_wd, "START") == 0)
|
else if (pg_strcasecmp(prev_wd, "START") == 0)
|
||||||
COMPLETE_WITH_CONST("TRANSACTION");
|
COMPLETE_WITH_CONST("TRANSACTION");
|
||||||
|
|
||||||
|
/* TABLE, but not TABLE embedded in other commands */
|
||||||
|
else if (pg_strcasecmp(prev_wd, "TABLE") == 0 &&
|
||||||
|
prev2_wd[0] == '\0')
|
||||||
|
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_relations, NULL);
|
||||||
|
|
||||||
/* TRUNCATE */
|
/* TRUNCATE */
|
||||||
else if (pg_strcasecmp(prev_wd, "TRUNCATE") == 0)
|
else if (pg_strcasecmp(prev_wd, "TRUNCATE") == 0)
|
||||||
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_tables, NULL);
|
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_tables, NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user