# ALTER_USER - man(7) - [phpMan]

_ALTER_ [_USER_(7)](https://www.chedong.com/phpMan.php/man/USER/7/markdown)                      PostgreSQL 16.14 Documentation                      _ALTER_ [_USER_(7)](https://www.chedong.com/phpMan.php/man/USER/7/markdown)

## NAME
       ALTER_USER - change a database role

## SYNOPSIS
       ALTER USER _role_specification_ [ WITH ] _option_ [ ... ]

       where _option_ can be:

             SUPERUSER | NOSUPERUSER
           | CREATEDB | NOCREATEDB
           | CREATEROLE | NOCREATEROLE
           | INHERIT | NOINHERIT
           | LOGIN | NOLOGIN
           | REPLICATION | NOREPLICATION
           | BYPASSRLS | NOBYPASSRLS
           | CONNECTION LIMIT _connlimit_
           | [ ENCRYPTED ] PASSWORD '_password_' | PASSWORD NULL
           | VALID UNTIL '_timestamp_'

       ALTER USER _name_ RENAME TO _new_name_

       ALTER USER { _role_specification_ | ALL } [ IN DATABASE _database_name_ ] SET _configuration_parameter_ { TO | = } { _value_ | DEFAULT }
       ALTER USER { _role_specification_ | ALL } [ IN DATABASE _database_name_ ] SET _configuration_parameter_ FROM CURRENT
       ALTER USER { _role_specification_ | ALL } [ IN DATABASE _database_name_ ] RESET _configuration_parameter_
       ALTER USER { _role_specification_ | ALL } [ IN DATABASE _database_name_ ] RESET ALL

       where _role_specification_ can be:

           _role_name_
         | CURRENT_ROLE
         | CURRENT_USER
         | SESSION_USER

## DESCRIPTION
       **ALTER USER **is now an alias for **ALTER ROLE**.

## COMPATIBILITY
       The **ALTER USER **statement is a PostgreSQL extension. The SQL standard leaves the definition of
       users to the implementation.

## SEE ALSO
       ALTER ROLE ([**ALTER_ROLE**(7)](https://www.chedong.com/phpMan.php/man/ALTERROLE/7/markdown))

PostgreSQL 16.14                                2026                                   _ALTER_ [_USER_(7)](https://www.chedong.com/phpMan.php/man/USER/7/markdown)
