]> begriffs open source - ai-pg/blob - full-docs/txt/sql-alteruser.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / sql-alteruser.txt
1
2 ALTER USER
3
4    ALTER USER — change a database role
5
6 Synopsis
7
8 ALTER USER role_specification [ WITH ] option [ ... ]
9
10 where option can be:
11
12       SUPERUSER | NOSUPERUSER
13     | CREATEDB | NOCREATEDB
14     | CREATEROLE | NOCREATEROLE
15     | INHERIT | NOINHERIT
16     | LOGIN | NOLOGIN
17     | REPLICATION | NOREPLICATION
18     | BYPASSRLS | NOBYPASSRLS
19     | CONNECTION LIMIT connlimit
20     | [ ENCRYPTED ] PASSWORD 'password' | PASSWORD NULL
21     | VALID UNTIL 'timestamp'
22
23 ALTER USER name RENAME TO new_name
24
25 ALTER USER { role_specification | ALL } [ IN DATABASE database_name ] SET config
26 uration_parameter { TO | = } { value | DEFAULT }
27 ALTER USER { role_specification | ALL } [ IN DATABASE database_name ] SET config
28 uration_parameter FROM CURRENT
29 ALTER USER { role_specification | ALL } [ IN DATABASE database_name ] RESET conf
30 iguration_parameter
31 ALTER USER { role_specification | ALL } [ IN DATABASE database_name ] RESET ALL
32
33 where role_specification can be:
34
35     role_name
36   | CURRENT_ROLE
37   | CURRENT_USER
38   | SESSION_USER
39
40 Description
41
42    ALTER USER is now an alias for ALTER ROLE.
43
44 Compatibility
45
46    The ALTER USER statement is a PostgreSQL extension. The SQL standard
47    leaves the definition of users to the implementation.
48
49 See Also
50
51    ALTER ROLE