mirror of
https://github.com/postgres/postgres.git
synced 2026-03-09 09:40:40 -04:00
psql: Tab-complete ALTER ROLE ... IN DATABASE SET/RESET
Detailed completion of the RESET clause is still missing. Not sure a detailed implementation is worth the trouble. Author: Ian Lawrence Barwick <barwick@gmail.com> Author: Vasuki M <vasukianand0119@gmail.com> Reviewed-by: zengman <zengman@halodbtech.com> Reviewed-by: Dharin Shah <dharinshah95@gmail.com> Reviewed-by: Surya Poondla <suryapoondla4@gmail.com> Discussion: https://postgr.es/m/CAB8KJ=iH_v1YB2ss1A=BqvOAf28OVYiWRqUdE6TJ3pP-RdsPig@mail.gmail.com
This commit is contained in:
parent
74b4438a70
commit
344b572e3e
1 changed files with 14 additions and 2 deletions
|
|
@ -2536,12 +2536,24 @@ match_previous_words(int pattern_id,
|
|||
else if (Matches("ALTER", "USER|ROLE", MatchAny) &&
|
||||
!TailMatches("USER", "MAPPING"))
|
||||
COMPLETE_WITH("BYPASSRLS", "CONNECTION LIMIT", "CREATEDB", "CREATEROLE",
|
||||
"ENCRYPTED PASSWORD", "INHERIT", "LOGIN", "NOBYPASSRLS",
|
||||
"ENCRYPTED PASSWORD", "IN", "INHERIT", "LOGIN", "NOBYPASSRLS",
|
||||
"NOCREATEDB", "NOCREATEROLE", "NOINHERIT",
|
||||
"NOLOGIN", "NOREPLICATION", "NOSUPERUSER", "PASSWORD",
|
||||
"RENAME TO", "REPLICATION", "RESET", "SET", "SUPERUSER",
|
||||
"VALID UNTIL", "WITH");
|
||||
|
||||
/* ALTER USER,ROLE <name> IN */
|
||||
else if (Matches("ALTER", "USER|ROLE", MatchAny, "IN"))
|
||||
COMPLETE_WITH("DATABASE");
|
||||
/* ALTER USER,ROLE <name> IN DATABASE */
|
||||
else if (Matches("ALTER", "USER|ROLE", MatchAny, "IN", "DATABASE"))
|
||||
COMPLETE_WITH_QUERY(Query_for_list_of_databases);
|
||||
/* ALTER USER,ROLE <name> IN DATABASE <dbname> */
|
||||
else if (Matches("ALTER", "USER|ROLE", MatchAny, "IN", "DATABASE", MatchAny))
|
||||
COMPLETE_WITH("SET", "RESET");
|
||||
/* ALTER USER,ROLE <name> IN DATABASE <dbname> SET */
|
||||
else if (Matches("ALTER", "USER|ROLE", MatchAny, "IN", "DATABASE", MatchAny, "SET"))
|
||||
COMPLETE_WITH_QUERY(Query_for_list_of_set_vars);
|
||||
/* XXX missing support for ALTER ROLE <name> IN DATABASE <dbname> RESET */
|
||||
/* ALTER USER,ROLE <name> RESET */
|
||||
else if (Matches("ALTER", "USER|ROLE", MatchAny, "RESET"))
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue