PostgreSQL – fix all database tables owner in one shot

For those who needs to update the owner of all tables of a PostgreSQL database in one shot, I’ve written a simple but effective script

Requirements to run this script are simple

  • access to the database server using psql client
  • enough privileges to update the db schema

The script

Adapt the two variable NEW_OWNER and YOUR_DB to your setup

Enjoy !

Leave a Reply

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



Back to Top