How to rename PostgreSQL role name

In this article, we will see how to rename PostgreSQL role name.

The ALTER ROLE statement also allows for a change in the name of the role: the RENAME
clause allows for a role to be substituted by another unique role name.

Syntax to rename PostgreSQL role:
Continue reading How to rename PostgreSQL role name

How to rename PostgreSQL database

In this article, we will see How to rename PostgreSQL database. ALTER DATABASE command is used to change the name of database in PostgreSQL Server. Only the database owner or a superuser can rename a database and non-superuser owners must also have the CREATEDB privilege.

ALTER DATABASE Syntax:

ALTER DATABASE database_name RENAME TO new_database_name [ [ WITH ] option [ ... ] ]

Continue reading How to rename PostgreSQL database