summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2017-07-27 14:13:15 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2017-07-27 14:13:15 -0400
commit689646b05e86a1fb93bd1dcd71dc8b695e586030 (patch)
tree88a28963cf3e4df7e81f5b4c27a90e9f21159385 /src
parent00cf718b84af63bc7bfb4c937979c42d0973db79 (diff)
Fix psql tab completion for CREATE USER MAPPING.
After typing CREATE USER M..., it would not fill in MAPPING FOR, even though that was clearly intended behavior. Jeff Janes Discussion: https://postgr.es/m/CAMkU=1wo2iQ6jWnN=egqOb5NxEPn0PpANEtKHr3uPooQ+nYPtw@mail.gmail.com
Diffstat (limited to 'src')
-rw-r--r--src/bin/psql/tab-complete.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
index b9aac29b730..f40abf3e705 100644
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -802,7 +802,7 @@ static const pgsql_thing_t words_after_create[] = {
{"UNIQUE", NULL, NULL, THING_NO_DROP}, /* for CREATE UNIQUE INDEX ... */
{"UNLOGGED", NULL, NULL, THING_NO_DROP}, /* for CREATE UNLOGGED TABLE
* ... */
- {"USER", Query_for_list_of_roles},
+ {"USER", Query_for_list_of_roles " UNION SELECT 'MAPPING FOR'"},
{"USER MAPPING FOR", NULL, NULL},
{"VIEW", NULL, &Query_for_list_of_views},
{NULL} /* end of list */