4 ms·
Do you have an example of where one might use WITH RECURSIVE?
by choppaface 7y ago
Do you have an example of where one might use WITH RECURSIVE?
- gbrgr 7y agoA 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).