What is the equivalent PostgreSQL syntax to Oracle’s CONNECT BY … START WITH?
Use a RECURSIVE CTE in Postgres: WITH RECURSIVE cte AS ( SELECT key, value, 1 AS level FROM taxonomy WHERE key = 0 UNION ALL SELECT t.key, t.value, c.level + 1 FROM cte c JOIN taxonomy t ON t.taxHier = c.key ) SELECT value FROM cte ORDER BY level; Details and links to documentation in … Read more