<div dir="ltr">Hello,<div><br></div><div>I have a graph and I want to find all the the disconnected nodes, and by "disconnected" I mean all the nodes that have no path to node A. There is a case where A can be more then 1 node, and I need to find out if there is a path to at least one of them.</div>
<div><br></div><div style>My first idea is just to route to A from each node, easy to implement, but if I will have many nodes this will prove problematic.</div><div style><br></div><div style>Any ideas how to do this more efficiently inside PostgreSQL ?</div>
<div><div><br></div><div style>Best Regards,</div><div style>Iacovlev Pavel</div></div></div>