Tim Wright <postgresql(at)icehawk(dot)freeserve(dot)co(dot)uk> writes:
> select company_name from Company
> connect by company_id = prior parent_company_id
> start with company_id = 1234
There's not a whole lot of interest around here in emulating Oracle's
proprietary CONNECT BY syntax. Some work has been done towards
implementing the SQL99 standard's features for "recursive queries"
(WITH et al), but it's unfinished work as of 7.4.
My general impression is that the spec's syntax for recursion is
considerably more flexible and powerful than CONNECT BY, but
correspondingly less easy to use :-(. Sorta the outer-join story
all over again.
We might have WITH for 7.5, but I'd not want to swear to it.
regards, tom lane