summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHeikki Linnakangas2011-03-03 07:42:02 +0000
committerHeikki Linnakangas2011-03-03 07:42:49 +0000
commit8e2d8b1497ac64142bb7df05e39a58ebf3e62bf6 (patch)
tree65953d39298fb8d663a28cf6494dbb742dee12d2 /src
parent8c4164540b30434845be02f84973663bfeb231ab (diff)
Add tab-completion for table name after JOIN.
Andrey Popp
Diffstat (limited to 'src')
-rw-r--r--src/bin/psql/tab-complete.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
index de34f25d257..2214471ceab 100644
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -2751,6 +2751,10 @@ psql_completion(char *text, int start, int end)
pg_strcasecmp(prev3_wd, "\\copy") != 0)
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_tsvf, NULL);
+/* ... JOIN ... */
+ else if (pg_strcasecmp(prev_wd, "JOIN") == 0)
+ COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_tsvf, NULL);
+
/* Backslash commands */
/* TODO: \dc \dd \dl */
else if (strcmp(prev_wd, "\\connect") == 0 || strcmp(prev_wd, "\\c") == 0)