Sunday , February 16 2025

How to Change Database OWNER in PostgreSQL

In today’s article, we will explain how to change the OWNER when creating a database and after it has been created in PostgreSQL.

PostgreSQL provides an ALTER DATABASE command that allows us to modify a database.

For instance, using ALTER DATABASE command, you can alter the database name, attributes, owner, etc.

In Postgres, the ALTER DATABASE command uses the OWNER TO clause to change/modify the database owner.

To change the owner while creating a database:

To change the owner after creating a database:

Loading

About Faruk Erdem

Leave a Reply

Your email address will not be published. Required fields are marked *