News for hackers. Stuff that matters.
Re:Ask HN: It's 2023, how do you choose between MySQL and Po... by jesterson on Friday May 12, 2023 @02:38AM (#35912756)
Working with MySQL (MariaDB, but doesn't make much difference). Never get any issues that couldn't be explained by architectural or development mistakes.

Just as example - how do you create read-only user (SELECT only) in Postgres? In MySQL it's extremely simple and it works, while in Postgres it's a nightmare to create and maintain

Re:Ask HN: It's 2023, how do you choose between MySQL and Po... by Someone on Friday May 12, 2023 @04:00AM (#35913312)
> Just as example - how do you create read-only user (SELECT only) in Postgres? In MySQL it's extremely simple and it works, while in Postgres it's a nightmare to create

Isn’t that

  GRANT SELECT ON ALL TABLES IN SCHEMA foo TO bar;
?

> and maintain

If you mean you want to grant a user select rights to whatever table gets created in the future (a somewhat questionable idea from a security viewpoint):

  ALTER DEFAULT PRIVILEGES IN SCHEMA foo GRANT SELECT ON TABLES TO bar;
I think both are possible in PostgreSQL 9 and later (https://www.postgresql.org/docs/9.0/sql-grant.html , https://www.postgresql.org/docs/9.0/sql-alterdefaultprivileg...)

That version is from 2010.

I guess the lesson is that both these systems evolve fairly rapidly. You can’t use quirks you remember from over 5 years ago to judge their current versions.

Re:Ask HN: It's 2023, how do you choose between MySQL and Po... by jesterson on Monday May 15, 2023 @03:30AM (#35944829)
It is correct but apparently not sufficient - you need to give CONNECT access to user profile.