Commit 14158f25 authored by Itagaki Takahiro's avatar Itagaki Takahiro

Improve psql tab completion for CREATE/ALTER ROLE [NO]REPLICATION.

Missing support for VALID UNTIL in CREATE ROLE is also added.
parent 7f60be72
...@@ -936,10 +936,11 @@ psql_completion(char *text, int start, int end) ...@@ -936,10 +936,11 @@ psql_completion(char *text, int start, int end)
pg_strcasecmp(prev2_wd, "ROLE") == 0)) pg_strcasecmp(prev2_wd, "ROLE") == 0))
{ {
static const char *const list_ALTERUSER[] = static const char *const list_ALTERUSER[] =
{"ENCRYPTED", "UNENCRYPTED", "CREATEDB", "NOCREATEDB", "CREATEUSER", {"CONNECTION LIMIT", "CREATEDB", "CREATEROLE", "CREATEUSER",
"NOCREATEUSER", "CREATEROLE", "NOCREATEROLE", "INHERIT", "NOINHERIT", "ENCRYPTED", "INHERIT", "LOGIN", "NOCREATEDB", "NOCREATEROLE",
"LOGIN", "NOLOGIN", "CONNECTION LIMIT", "VALID UNTIL", "RENAME TO", "NOCREATEUSER", "NOINHERIT", "NOLOGIN", "NOREPLICATION",
"SUPERUSER", "NOSUPERUSER", "SET", "RESET", NULL}; "NOSUPERUSER", "RENAME TO", "REPLICATION", "RESET", "SET",
"SUPERUSER", "UNENCRYPTED", "VALID UNTIL", NULL};
COMPLETE_WITH_LIST(list_ALTERUSER); COMPLETE_WITH_LIST(list_ALTERUSER);
} }
...@@ -1801,9 +1802,10 @@ psql_completion(char *text, int start, int end) ...@@ -1801,9 +1802,10 @@ psql_completion(char *text, int start, int end)
{ {
static const char *const list_CREATEROLE[] = static const char *const list_CREATEROLE[] =
{"ADMIN", "CONNECTION LIMIT", "CREATEDB", "CREATEROLE", "CREATEUSER", {"ADMIN", "CONNECTION LIMIT", "CREATEDB", "CREATEROLE", "CREATEUSER",
"ENCRYPTED", "IN", "INHERIT", "LOGIN", "NOINHERIT", "NOLOGIN", "NOCREATEDB", "ENCRYPTED", "IN", "INHERIT", "LOGIN", "NOCREATEDB",
"NOCREATEROLE", "NOCREATEUSER", "NOSUPERUSER", "ROLE", "SUPERUSER", "SYSID", "NOCREATEROLE", "NOCREATEUSER", "NOINHERIT", "NOLOGIN",
"UNENCRYPTED", NULL}; "NOREPLICATION", "NOSUPERUSER", "REPLICATION", "ROLE",
"SUPERUSER", "SYSID", "UNENCRYPTED", "VALID UNTIL", NULL};
COMPLETE_WITH_LIST(list_CREATEROLE); COMPLETE_WITH_LIST(list_CREATEROLE);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment