Transitive Closure and CONNECT BY

Started by Robert Jamesover 16 years ago2 messagesgeneral
Jump to latest
#1Robert James
srobertjames@gmail.com

Is there a transitive closure (or equivalent) operator in Postgres (or
extension)?
Anything like CONNECT BY?
Or any recommended way of querying hiearchial data?

#2Thomas Kellerer
spam_eater@gmx.net
In reply to: Robert James (#1)
Re: Transitive Closure and CONNECT BY

Robert James wrote on 26.07.2009 21:35:

Anything like CONNECT BY?
Or any recommended way of querying hiearchial data?

Yes, recursive common table expression (since 8.4)

http://www.postgresql.org/docs/current/static/queries-with.html

Thomas