How to change the owner of a Database in PostgreSQL

First you need to login with the Super User e.g.

psql postgres

After logged-in type the following command

ALTER DATABASE database OWNER TO newuser;

Replace database with your database and newuser with your username

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.