News for hackers. Stuff that matters.
Re:Hierarchical Structures in PostgreSQL (2020) by gnarbarian on Friday June 25, 2021 @12:35PM (#27633054)
This is the kind of thing I thought graph databases were good at. postgres extensions for this would be very interesting.
Re:Hierarchical Structures in PostgreSQL (2020) by setr on Friday June 25, 2021 @03:17PM (#27635083)
Most datasets have relationships forming a graph, but few need to be analyzed as a graph. Graph databases specialize for the latter usecase, with large datasets.

But you could always traverse graphs with recursive SQL — it’s just less pleasant, and perhaps less performant — but often that’s all you need (and often people confuse having a graph relationship with needing a graph-specialized database)

Re:Hierarchical Structures in PostgreSQL (2020) by zozbot234 on Friday June 25, 2021 @03:22PM (#27635136)
Postgres can handle a lot of generic 'graph' use cases. Unless you have very specialized needs, focusing on complex algorithms and very big network data, it's not at all clear that you'll need more than that.
Re:Hierarchical Structures in PostgreSQL (2020) by makr17 on Friday June 25, 2021 @04:22PM (#27635798)
And even then, it really depends on what you're trying to do.

My use case a few years ago was such that _every_ dedicated graph engine I tried would just OOM on the test set of ~10M nodes, which I attributed to insufficient pruning. Postgres was able to handle it, and still worked on the production set of ~1.5B nodes. The SQL took some tuning, and wasn't _pretty_, but it did _work_ where nothing else did...