aboutsummaryrefslogtreecommitdiff
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
commit8d304072a2573f0bfbdf893cc79197aeecdb5242 (patch)
tree2f2c9ca0c70d18cb50f17ad56cf1ce2a8f15d8ae /src
parent77cb4a1d6730a69906baf0b052aae7dc11f07764 (diff)
downloadpostgresql-8d304072a2573f0bfbdf893cc79197aeecdb5242.tar.gz
postgresql-8d304072a2573f0bfbdf893cc79197aeecdb5242.zip
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 e9fdc908c71..e34922dd731 100644
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -1056,7 +1056,7 @@ static const pgsql_thing_t words_after_create[] = {
* INDEX ... */
{"UNLOGGED", NULL, NULL, THING_NO_DROP | THING_NO_ALTER}, /* 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 */