Remix.run Logo
hans_castorp 5 hours ago

> If you want something that is more like actual recursion (I.e., depth-first), Oracle has CONNECT BY which does not require the same kind of tracking. It also comes with extra features to help with cycle detection, stack depth reflection, etc.

All that is supported with CTEs as well. And both Postgres and Oracle support the SQL standard for these things.

You can't choose between breadth first/depth first using CONNECT BY in Oracle. Oracle's manual even states that CTE are more powerful than CONNECT BY