Why? What is it about postgrest which makes it unsuitable for "real" usage? The author doesn't mention it.
Why? What is it about postgrest which makes it unsuitable for "real" usage? The author doesn't mention it.
1. Side effects: Want to send an email when something happens
2. conditional permissions: Need access to data under certain circumstances not modelled by the security language?
3. Subset access: Access to parts of the row / document.
4. Aggregate access: Access to eg. a count of rows you can not access.
These are usually solved using serverless functions – or an API written in code.
Personally I err to the side of just writing some code, maybe because I enjoy that part of the project. Then I might be more inclined to use no-code solutions for the frontend, where others want the freedom and flexibility.
I handle #1 with by listening to database changes then reacting as needed with a change capture / event-like system:
Which is not necessarily bad, RLS is sophisticated enough to handle all real world cases I've come across. But if it's just that I think it's more correct to say postgres already handles all of this.
Why start with an SQL database? When I start something new, I don't want to fiddle around with tables every time I change my model.
Is there a relational schemaless DB I wonder?
It’s no longer relational vs. NoSQL, you can get the best of both worlds. Assuming of course you don’t need “planetscale”.
But really, my advice for early prototyping is split in two: either keep it in memory and serialize to disk, or use SQLite.
Note that even using serialized memory constructs will require data migrations, aka schema updates.