Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 157adfd

Browse files
committed
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
1 parent a2fc343 commit 157adfd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bin/psql/tab-complete.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,7 @@ static const pgsql_thing_t words_after_create[] = {
921921
{"UNIQUE", NULL, NULL, THING_NO_DROP}, /* for CREATE UNIQUE INDEX ... */
922922
{"UNLOGGED", NULL, NULL, THING_NO_DROP}, /* for CREATE UNLOGGED TABLE
923923
* ... */
924-
{"USER", Query_for_list_of_roles},
924+
{"USER", Query_for_list_of_roles " UNION SELECT 'MAPPING FOR'"},
925925
{"USER MAPPING FOR", NULL, NULL},
926926
{"VIEW", NULL, &Query_for_list_of_views},
927927
{NULL} /* end of list */

0 commit comments

Comments
 (0)