quite nice
Posted Jul 1, 2009 18:28 UTC (Wed) by
tbrownaw (guest, #45457)
In reply to:
quite nice by ccyoung
Parent article:
PostgreSQL 8.4 released
recursive approach was complete surprise (to me) without "connect by" syntax. no coffee yet, so don't understand the overall coolness of WITH.
"connect by" is Oracle-specific, I believe the "recursive WITH" is the ANSI SQL standard way to do recursive queries (but I haven't seen the RECURSIVE keyword mentioned anywhere before, so no idea if this is exactly how the standard says). WITH in general is just a useful way to factor out complicated subqueries, sometimes it's easier to read top-to-bottom instead of inside-to-outside and sometimes you need the same subquery several times.
(
Log in to post comments)