0

I would like to create a json path for every node in the tree, The goal of every path is to store all the ancestors of the current node.

I've already found a solution to solve this matter in this question: Nested leaf node.

However, it only works for leaf nodes, and I need a query for every single node in the tree. Looking for a solution in pgsql.

I did try to solve it on my own by the query I found mentioned above, and could not figure it out.

Glad for any hel

  • Please **[edit]** your question (by clicking on the [edit] link below it) and add some sample data and the expected output based on that data as [formatted text](https://meta.stackoverflow.com/a/251362). See [here](https://meta.stackexchange.com/questions/81852) for some tips on how to create nice looking text tables. ([edit] your question - do **not** put code or additional information in comments) –  Dec 26 '22 at 09:26

0 Answers0