Skip to content

Commit 14158f2

Browse files
committed
Improve psql tab completion for CREATE/ALTER ROLE [NO]REPLICATION.
Missing support for VALID UNTIL in CREATE ROLE is also added.
1 parent 7f60be7 commit 14158f2

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/bin/psql/tab-complete.c

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -936,10 +936,11 @@ psql_completion(char *text, int start, int end)
936936
pg_strcasecmp(prev2_wd, "ROLE") == 0))
937937
{
938938
static const char *const list_ALTERUSER[] =
939-
{"ENCRYPTED", "UNENCRYPTED", "CREATEDB", "NOCREATEDB", "CREATEUSER",
940-
"NOCREATEUSER", "CREATEROLE", "NOCREATEROLE", "INHERIT", "NOINHERIT",
941-
"LOGIN", "NOLOGIN", "CONNECTION LIMIT", "VALID UNTIL", "RENAME TO",
942-
"SUPERUSER", "NOSUPERUSER", "SET", "RESET", NULL};
939+
{"CONNECTION LIMIT", "CREATEDB", "CREATEROLE", "CREATEUSER",
940+
"ENCRYPTED", "INHERIT", "LOGIN", "NOCREATEDB", "NOCREATEROLE",
941+
"NOCREATEUSER", "NOINHERIT", "NOLOGIN", "NOREPLICATION",
942+
"NOSUPERUSER", "RENAME TO", "REPLICATION", "RESET", "SET",
943+
"SUPERUSER", "UNENCRYPTED", "VALID UNTIL", NULL};
943944

944945
COMPLETE_WITH_LIST(list_ALTERUSER);
945946
}
@@ -1801,9 +1802,10 @@ psql_completion(char *text, int start, int end)
18011802
{
18021803
static const char *const list_CREATEROLE[] =
18031804
{"ADMIN", "CONNECTION LIMIT", "CREATEDB", "CREATEROLE", "CREATEUSER",
1804-
"ENCRYPTED", "IN", "INHERIT", "LOGIN", "NOINHERIT", "NOLOGIN", "NOCREATEDB",
1805-
"NOCREATEROLE", "NOCREATEUSER", "NOSUPERUSER", "ROLE", "SUPERUSER", "SYSID",
1806-
"UNENCRYPTED", NULL};
1805+
"ENCRYPTED", "IN", "INHERIT", "LOGIN", "NOCREATEDB",
1806+
"NOCREATEROLE", "NOCREATEUSER", "NOINHERIT", "NOLOGIN",
1807+
"NOREPLICATION", "NOSUPERUSER", "REPLICATION", "ROLE",
1808+
"SUPERUSER", "SYSID", "UNENCRYPTED", "VALID UNTIL", NULL};
18071809

18081810
COMPLETE_WITH_LIST(list_CREATEROLE);
18091811
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy