2

I'm using PostgreSQL with ltree extension.

Consider I have the following structure in my database:

nodes graph

Given C node (path: A.C) as a start node and I node (path: A.C.F.G.I) as an end node I want to select all nodes between them including the boundaries. So, the result should include: C, F, G, I, but not the other nodes.

Is there a combination of built-in ltree functions I could use to write up a query?

Slava Fomin II
  • 26,865
  • 29
  • 124
  • 202

0 Answers0