Posted Jul 1, 2009 18:28 UTC (Wed) by tbrownaw (guest, #45457)
[Link]
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.
quite nice
Posted Jul 1, 2009 21:37 UTC (Wed) by flewellyn (subscriber, #5047)
[Link]
Wow, those window functions and WITH queries would be amazingly powerful with PostGIS. I'm going to have to schedule an upgrade within the next few months!
ALTER SEQUENCE (expression)
Posted Jul 1, 2009 22:03 UTC (Wed) by alvherre (subscriber, #18730)
[Link]
Don't hold your breath for using an expression in ALTER SEQUENCE, but you can already use one with the setval() function.
The commenter above is right that WITH RECURSIVE is part of the SQL standard. Yes, RECURSIVE too.