1999-07-22 17:09:15 +02:00
<!--
2008-11-14 11:22:48 +01:00
$PostgreSQL: pgsql/doc/src/sgml/ref/alter_user.sgml,v 1.45 2008/11/14 10:22:45 petere Exp $
2001-12-08 04:24:40 +01:00
PostgreSQL documentation
1999-07-22 17:09:15 +02:00
-->
1999-07-06 19:16:42 +02:00
<refentry id="SQL-ALTERUSER">
<refmeta>
2002-02-27 22:14:54 +01:00
<refentrytitle id="sql-alteruser-title">ALTER USER</refentrytitle>
2008-11-14 11:22:48 +01:00
<manvolnum>7</manvolnum>
1999-07-06 19:16:42 +02:00
<refmiscinfo>SQL - Language Statements</refmiscinfo>
</refmeta>
2002-02-27 22:14:54 +01:00
1999-07-06 19:16:42 +02:00
<refnamediv>
2002-02-27 22:14:54 +01:00
<refname>ALTER USER</refname>
2005-07-27 01:24:02 +02:00
<refpurpose>change a database role</refpurpose>
1998-12-29 03:24:47 +01:00
</refnamediv>
2002-02-27 22:14:54 +01:00
2003-08-31 19:32:24 +02:00
<indexterm zone="sql-alteruser">
<primary>ALTER USER</primary>
</indexterm>
1999-07-06 19:16:42 +02:00
<refsynopsisdiv>
2002-02-27 22:14:54 +01:00
<synopsis>
2003-09-22 02:16:58 +02:00
ALTER USER <replaceable class="PARAMETER">name</replaceable> [ [ WITH ] <replaceable class="PARAMETER">option</replaceable> [ ... ] ]
2001-07-11 00:09:29 +02:00
where <replaceable class="PARAMETER">option</replaceable> can be:
2005-07-27 01:24:02 +02:00
SUPERUSER | NOSUPERUSER
| CREATEDB | NOCREATEDB
| CREATEROLE | NOCREATEROLE
| CREATEUSER | NOCREATEUSER
| INHERIT | NOINHERIT
| LOGIN | NOLOGIN
2005-07-31 19:19:22 +02:00
| CONNECTION LIMIT <replaceable class="PARAMETER">connlimit</replaceable>
2005-07-27 01:24:02 +02:00
| [ ENCRYPTED | UNENCRYPTED ] PASSWORD '<replaceable class="PARAMETER">password</replaceable>'
| VALID UNTIL '<replaceable class="PARAMETER">timestamp</replaceable>'
2002-03-01 23:45:19 +01:00
2003-09-22 02:16:58 +02:00
ALTER USER <replaceable class="PARAMETER">name</replaceable> RENAME TO <replaceable>newname</replaceable>
2003-06-27 16:45:32 +02:00
2006-04-25 16:56:04 +02:00
ALTER USER <replaceable class="PARAMETER">name</replaceable> SET <replaceable>configuration_parameter</replaceable> { TO | = } { <replaceable>value</replaceable> | DEFAULT }
2007-09-03 20:46:30 +02:00
ALTER USER <replaceable class="PARAMETER">name</replaceable> SET <replaceable>configuration_parameter</replaceable> FROM CURRENT
2006-04-25 16:56:04 +02:00
ALTER USER <replaceable class="PARAMETER">name</replaceable> RESET <replaceable>configuration_parameter</replaceable>
2007-09-03 20:46:30 +02:00
ALTER USER <replaceable class="PARAMETER">name</replaceable> RESET ALL
2002-02-27 22:14:54 +01:00
</synopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
1999-07-06 19:16:42 +02:00
2002-02-27 22:14:54 +01:00
<para>
2005-07-27 01:24:02 +02:00
<command>ALTER USER</command> is now an alias for
2007-05-15 21:43:51 +02:00
<xref linkend="sql-alterrole" endterm="sql-alterrole-title">.
1999-07-06 19:16:42 +02:00
</para>
</refsect1>
2002-02-27 22:14:54 +01:00
<refsect1>
<title>Compatibility</title>
1998-05-13 07:34:00 +02:00
2002-02-27 22:14:54 +01:00
<para>
The <command>ALTER USER</command> statement is a
<productname>PostgreSQL</productname> extension. The SQL standard
leaves the definition of users to the implementation.
</para>
</refsect1>
<refsect1>
<title>See Also</title>
<simplelist type="inline">
2005-07-27 01:24:02 +02:00
<member><xref linkend="sql-alterrole" endterm="sql-alterrole-title"></member>
2002-02-27 22:14:54 +01:00
</simplelist>
1999-07-06 19:16:42 +02:00
</refsect1>
</refentry>