Postgresql is following a blacklist access model which is really hard to get right, a whitelist approach like mysql would be much easier.
Postgresql is following a blacklist access model which is really hard to get right, a whitelist approach like mysql would be much easier.
I don't think this is quite right. When a new user is created in Postgres, I don't believe any permissions are implicitly GRANTed by default aside from CONNECT. And I believe the only default privileges granted on a given database are to its owner. Is it possible your experience has only been with configurations in which your PG user was either the owner of the database or a superuser?
EDIT: clarification
[1] https://aws.amazon.com/de/blogs/database/managing-postgresql...
In particular, note the justification for the default:
> Keep the default. All users access the public schema implicitly. This simulates the situation where schemas are not available at all, giving a smooth transition from the non-schema-aware world. However, this is never a secure pattern. It is acceptable only when the database has a single user or a few mutually-trusting users.
Note that you can change the set of default privileges, including the grant to PUBLIC. E.g. ALTER DEFAULT PRIVILEGES REVOKE ALL ON TABLES FROM PUBLIC;
> The only way to remove this is to remove the rights on the public role affecting every other user. In this case the mysql concept is better as every new user has by default absolutely no rights.
This seems a bit contradictory...