Re: Anything like Oracle's "connect by" SQL?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tim Wright <postgresql(at)icehawk(dot)freeserve(dot)co(dot)uk>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Anything like Oracle's "connect by" SQL?
Date: 2003-10-02 05:02:42
Message-ID: 20630.1065070962@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Josh Berkus 2003-10-02 05:47:08 Re: Anything like Oracle's "connect by" SQL?
Previous Message Williams, Quinton L 2003-10-02 03:28:11 PostgreSQL and .NET