How to change the owner of a Database in PostgreSQL

H

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

About the author

Ian Carnaghan

I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment.

About Author

Ian Carnaghan

I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment.

Follow Me