News for hackers. Stuff that matters.
Re:Hierarchical Structures in PostgreSQL (2020) by mjburgess on Friday June 25, 2021 @12:12PM (#27632641)
Is any one aware of a language (or dsl) which will compile to recursive CTEs?

It'd be helpful to see queries at the domain level to understand how they fit into a problem; rather than this weird embedding of some implicit idea.

Re:Hierarchical Structures in PostgreSQL (2020) by handrous on Friday June 25, 2021 @12:42PM (#27633159)
There's the AGE plugin:

https://age.apache.org

Dunno how close it is to being ready for production, but it lets you use Cypher in PostgreSQL, which is a pretty damn nice language for doing many of the things you'd use recursive CTEs for. I don't much care for Neo4j (the "home" database for the Cypher language) but Cypher is good.

Re:Hierarchical Structures in PostgreSQL (2020) by jitl on Friday June 25, 2021 @12:29PM (#27632937)
I spent some time looking for this specifically to translate Datalog or Prolog to SQL. There’s theoretical work out there but I didn’t find anything plug and play.
Re:Hierarchical Structures in PostgreSQL (2020) by refset on Friday June 25, 2021 @12:40PM (#27633133)
Not exactly plug and play, but for BigQuery there's now Logica https://opensource.googleblog.com/2021/04/logica-organizing-...
Re:Hierarchical Structures in PostgreSQL (2020) by jitl on Friday June 25, 2021 @10:13PM (#27638437)
Thanks, this is great — and it claims experimental support for SQLite which is where I want it the most.