3
PostgreSQL documentation
6
<refentry id="SQL-ALTERUSER">
8
<refentrytitle id="sql-alteruser-title">ALTER USER</refentrytitle>
9
<manvolnum>7</manvolnum>
10
<refmiscinfo>SQL - Language Statements</refmiscinfo>
14
<refname>ALTER USER</refname>
15
<refpurpose>change a database role</refpurpose>
18
<indexterm zone="sql-alteruser">
19
<primary>ALTER USER</primary>
24
ALTER USER <replaceable class="PARAMETER">name</replaceable> [ [ WITH ] <replaceable class="PARAMETER">option</replaceable> [ ... ] ]
26
where <replaceable class="PARAMETER">option</replaceable> can be:
28
SUPERUSER | NOSUPERUSER
29
| CREATEDB | NOCREATEDB
30
| CREATEROLE | NOCREATEROLE
31
| CREATEUSER | NOCREATEUSER
34
| CONNECTION LIMIT <replaceable class="PARAMETER">connlimit</replaceable>
35
| [ ENCRYPTED | UNENCRYPTED ] PASSWORD '<replaceable class="PARAMETER">password</replaceable>'
36
| VALID UNTIL '<replaceable class="PARAMETER">timestamp</replaceable>'
38
ALTER USER <replaceable class="PARAMETER">name</replaceable> RENAME TO <replaceable>newname</replaceable>
40
ALTER USER <replaceable class="PARAMETER">name</replaceable> SET <replaceable>configuration_parameter</replaceable> { TO | = } { <replaceable>value</replaceable> | DEFAULT }
41
ALTER USER <replaceable class="PARAMETER">name</replaceable> SET <replaceable>configuration_parameter</replaceable> FROM CURRENT
42
ALTER USER <replaceable class="PARAMETER">name</replaceable> RESET <replaceable>configuration_parameter</replaceable>
43
ALTER USER <replaceable class="PARAMETER">name</replaceable> RESET ALL
48
<title>Description</title>
51
<command>ALTER USER</command> is now an alias for
52
<xref linkend="sql-alterrole" endterm="sql-alterrole-title">.
57
<title>Compatibility</title>
60
The <command>ALTER USER</command> statement is a
61
<productname>PostgreSQL</productname> extension. The SQL standard
62
leaves the definition of users to the implementation.
67
<title>See Also</title>
69
<simplelist type="inline">
70
<member><xref linkend="sql-alterrole" endterm="sql-alterrole-title"></member>