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

Missing support for VALID UNTIL in CREATE ROLE is also added.
This commit is contained in:
Itagaki Takahiro 2011-01-04 17:56:01 +09:00
parent 7f60be72b0
commit 14158f25cd

View File

@ -936,10 +936,11 @@ psql_completion(char *text, int start, int end)
pg_strcasecmp(prev2_wd, "ROLE") == 0))
{
static const char *const list_ALTERUSER[] =
{"ENCRYPTED", "UNENCRYPTED", "CREATEDB", "NOCREATEDB", "CREATEUSER",
"NOCREATEUSER", "CREATEROLE", "NOCREATEROLE", "INHERIT", "NOINHERIT",
"LOGIN", "NOLOGIN", "CONNECTION LIMIT", "VALID UNTIL", "RENAME TO",
"SUPERUSER", "NOSUPERUSER", "SET", "RESET", NULL};
{"CONNECTION LIMIT", "CREATEDB", "CREATEROLE", "CREATEUSER",
"ENCRYPTED", "INHERIT", "LOGIN", "NOCREATEDB", "NOCREATEROLE",
"NOCREATEUSER", "NOINHERIT", "NOLOGIN", "NOREPLICATION",
"NOSUPERUSER", "RENAME TO", "REPLICATION", "RESET", "SET",
"SUPERUSER", "UNENCRYPTED", "VALID UNTIL", NULL};
COMPLETE_WITH_LIST(list_ALTERUSER);
}
@ -1801,9 +1802,10 @@ psql_completion(char *text, int start, int end)
{
static const char *const list_CREATEROLE[] =
{"ADMIN", "CONNECTION LIMIT", "CREATEDB", "CREATEROLE", "CREATEUSER",
"ENCRYPTED", "IN", "INHERIT", "LOGIN", "NOINHERIT", "NOLOGIN", "NOCREATEDB",
"NOCREATEROLE", "NOCREATEUSER", "NOSUPERUSER", "ROLE", "SUPERUSER", "SYSID",
"UNENCRYPTED", NULL};
"ENCRYPTED", "IN", "INHERIT", "LOGIN", "NOCREATEDB",
"NOCREATEROLE", "NOCREATEUSER", "NOINHERIT", "NOLOGIN",
"NOREPLICATION", "NOSUPERUSER", "REPLICATION", "ROLE",
"SUPERUSER", "SYSID", "UNENCRYPTED", "VALID UNTIL", NULL};
COMPLETE_WITH_LIST(list_CREATEROLE);
}