
SQL Tip: JSONB_AGG in PostgreSQL for simple one-to-many joins - geekuillaume
https://medium.com/@geekuillaume/sql-tip-jsonb-agg-in-postgresql-for-simple-one-to-many-joins-bde8caa30c46
======
sven_n
I'm doing this even more extreme... querying a whole complex object graph
based on an entity framework core model :)
[https://github.com/MUnique/OpenMU/blob/master/src/Persistenc...](https://github.com/MUnique/OpenMU/blob/master/src/Persistence/EntityFramework/Json/JsonQueryBuilder.cs)

------
tbrugz
Oracle has cursor expressions that returns a resultset inside a cell from the
parent resultset. The whole resultset could then be serialized to json, xml or
whatever

I wish there was an equivalent function in PostgreSQL. I've even asked a
question about that on stackoverflow:

[https://stackoverflow.com/questions/8637050/cursor-inside-
sq...](https://stackoverflow.com/questions/8637050/cursor-inside-sql-query)

------
zykran
Nice !

