postgres recursive query on the same table
问题 i spent almost a day on it now and it seems like i am doing something wrong. ok , here is the relation: document_urls( doc_id , url_id) what i want to do is to build a sorte of graph that will show all the children that has been generated from a document through on of his urls. example select * from document_urls where doc_id=1 doc_id url_id 1 2 1 3 if i select all the document with url_id=3 or 2 i will find select * from document_urls where url_id=2 or url_id=3 doc_id url_id 1 2 1 3 2 3 now