Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Do you have an example of where one might use WITH RECURSIVE?


A classical example is graph reachability. You'd express reachability via WITH RECURSIVE stating that nodes are reachable if there is a path of arbitrary length between them. (Recursion is needed since a plain SQL query can only query for paths up to a fixed length).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: