1ALTER USER(7)            PostgreSQL 14.3 Documentation           ALTER USER(7)
2
3
4

NAME

6       ALTER_USER - change a database role
7

SYNOPSIS

9       ALTER USER role_specification [ WITH ] option [ ... ]
10
11       where option can be:
12
13             SUPERUSER | NOSUPERUSER
14           | CREATEDB | NOCREATEDB
15           | CREATEROLE | NOCREATEROLE
16           | INHERIT | NOINHERIT
17           | LOGIN | NOLOGIN
18           | REPLICATION | NOREPLICATION
19           | BYPASSRLS | NOBYPASSRLS
20           | CONNECTION LIMIT connlimit
21           | [ ENCRYPTED ] PASSWORD 'password' | PASSWORD NULL
22           | VALID UNTIL 'timestamp'
23
24       ALTER USER name RENAME TO new_name
25
26       ALTER USER { role_specification | ALL } [ IN DATABASE database_name ] SET configuration_parameter { TO | = } { value | DEFAULT }
27       ALTER USER { role_specification | ALL } [ IN DATABASE database_name ] SET configuration_parameter FROM CURRENT
28       ALTER USER { role_specification | ALL } [ IN DATABASE database_name ] RESET configuration_parameter
29       ALTER USER { role_specification | ALL } [ IN DATABASE database_name ] RESET ALL
30
31       where role_specification can be:
32
33           role_name
34         | CURRENT_ROLE
35         | CURRENT_USER
36         | SESSION_USER
37

DESCRIPTION

39       ALTER USER is now an alias for ALTER ROLE.
40

COMPATIBILITY

42       The ALTER USER statement is a PostgreSQL extension. The SQL standard
43       leaves the definition of users to the implementation.
44

SEE ALSO

46       ALTER ROLE (ALTER_ROLE(7))
47
48
49
50PostgreSQL 14.3                      2022                        ALTER USER(7)
Impressum