I was debugging Postgres permissions the other day and was hoping for a tool where you can just diff the permissions of a table between databases and see why in one database a certain user has permissions (to insert, execute,...) and in the other one it doesn't.

That might be a naive ask and maybe that's not even possible but I'm wondering if such a thing exists?

Check out migra[1] - it covers most of that. One notable omission is column-level grants though - as far as I know changes to those aren’t detected

[1] https://github.com/djrobstep/migra