In this PostgreSQL post explains how to rename a user in PostgreSQL with syntax and examples.
The ALTER USER statement is used to rename a user in the PostgreSQL database.
The syntax to rename a user using the ALTER USER statement in PostgreSQL is:
The name of the user to rename in the PostgreSQL database.
The new name to assign to the user.
Let's look at how to rename a user in PostgreSQL using the ALTER USER statement.
For example:
In this example, the ALTER USER statement would rename the user called AODBA to dbd in the PostgreSQL database.