Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dventimi
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
22 ms
·
271.
▲
by
dventimi
2y ago
Thanks! I ask because I tend to put business logic into a few broad categories: input validation, data transformation, sequencing, integration. The database can usually handle the first three out of these four well. That tracks with your &q
272.
▲
by
dventimi
2y ago
Yes, that's what I understood your belief to be, right from the beginning of this thread. I just haven't encountered any reason anywhere among these comments to persuade me to share your belief.
273.
▲
by
dventimi
2y ago
> I don’t want to create a bunch of views to attempt to get it right Then don't. > You will pull every one of your hairs out trying to make that work with something like this No. I won't. I've already made this wo
274.
▲
by
dventimi
2y ago
That doesn't mean there isn't column-level security. It just means that `grant` and `revoke` alone are not the way to do it. The response to this criticism is the same as the response to many other criticisms among these comment
275.
▲
by
dventimi
2y ago
People are free not to use it, of course, but when they offer their reasoning I just don't think it holds up. For example, sometimes they say, "PostgREST doesn't save much because writing REST services is so trivial that it
276.
▲
by
dventimi
2y ago
The particular tool Fabien recommends may be "PostgREST", but the general approach is "API database architecture", which has been adopted by a number of other tools as well: PostGraphile, Prisma, and Hasura come to mind
277.
▲
by
dventimi
2y ago
I encourage you to read the HN guidelines and then read the comments that I've replied to, because many of them could with considerable justification be regarded as unkind, snarky, and smug. I would also encourage you not to make and t
278.
▲
by
dventimi
2y ago
> then you'd need a batch job to come along and read them out and send them into the analytics system of choice in the I wouldn't need that. I would just use the logs for analytics. > I've not seen anything around p
279.
▲
by
dventimi
2y ago
> even though we have the tools to completely automate this PostgREST is literally a tool to automate this.
280.
▲
by
dventimi
2y ago
If they're so easy to write, then why write them at all? Why aren't they being generated?
281.
▲
by
dventimi
2y ago
I have noted your opinion and have disregarded it.
282.
▲
by
dventimi
2y ago
Nothing about this imposes an infrastructure burden.
283.
▲
by
dventimi
2y ago
Joins are supported: https://postgrest.org/en/v12/references/api/resource_embeddi...
284.
▲
by
dventimi
2y ago
> in an endpoint I can do much more than just interrogating the database. And I usually do. Like what?
285.
▲
by
dventimi
2y ago
I don't see what the problem is with producing analytics. As for data database migrations, if anything about them is "notoriously hard" it isn't changing views and procedures.
286.
▲
by
dventimi
2y ago
Sure you can. Just write a function.
287.
▲
by
dventimi
2y ago
> There is a reason why people invent GraphQL or BFF Sure, it was because creating servers--REST or otherwise--with code (looking at you, Spring, Django, and RoR) is such a slow, laborsome task that rapidly iterating frontend teams got t
288.
▲
by
dventimi
2y ago
The database has RLS, and I don't care what PostgREST and Postgraphile are implemented in, so personally I'm unmoved by these two claims. As for things we're unable to imagine, what I can't imagine is how table structure
289.
▲
by
dventimi
2y ago
I see no particular reason to believe that Postgraphile, while a good tool, is any better (or any worse) than PostgREST, just as I see no reason to believe GraphQL is better than REST. As for layers of abstraction, one can have layers of ab
290.
▲
by
dventimi
2y ago
It's not another server. It's a replacement server. It replaces bespoke code that a developer was going to write. Hand built servers can fail too, you know.
291.
▲
by
dventimi
2y ago
Speak for yourself. Personally, I've only exposed views and procedures.
292.
▲
by
dventimi
2y ago
None of those things are made harder by using PostgREST.
293.
▲
by
dventimi
2y ago
PostgREST is not an ORM. I suspect you know that, but others might be confused so I wanted to point this out.
294.
▲
by
dventimi
2y ago
SQL is pretty good at transforming data.
295.
▲
by
dventimi
2y ago
The principle appliesw outside of PostgREST and PostgreSQL: Hasura, Prisma, Chilicream, there are several tools that provide automatic web APIs for a variety of databases.
296.
▲
by
dventimi
2y ago
> why use PostgREST and not just use your own framework which abstracts away your choice of Postgres as backend database with something more database agnostic Because I'm sticking with PostgreSQL and don't need database agnos
297.
▲
by
dventimi
2y ago
SQL views are a transformation layer.
298.
▲
by
dventimi
2y ago
> a new tool that lives outside of/alongside your existing application architecture It need not live either outside of or alongside application code. Substituting application code with PostgREST is an option. > With properly-f
299.
▲
by
dventimi
2y ago
> I don't understand what's the benefit of adding additional third party code into the hot-path PostgREST doesn't add an additional third-party library. It replaces one or more third-party libraries: Spring, Django, RoR,
300.
▲
by
dventimi
2y ago
> If end users need a direct line to the database, then get your RBAC nailed down and open the DB's port up to the end user I do, when users are willing to speak libpq. When they insist on speaking HTTP, then I use PostgREST.
More ›