CONNECT BY

Started by Ruslan A Dautkhanovalmost 22 years ago2 messagesbugs
Jump to latest
#1Ruslan A Dautkhanov
rusland@scn.ru

Hello !

Here's the patch ( http://gppl.terminal.ru/ ), which allow
PostgreSQL use queries like

select id

from tab

start with = 1111
connect by id = prior parent_id

as described in SQL standard...

Developers can look if it's possible to merge this patch
with current CVS.

--
best regards,
Ruslan A Dautkhanov rusland@scn.ru

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Ruslan A Dautkhanov (#1)
Re: CONNECT BY

Ruslan A Dautkhanov <rusland@scn.ru> writes:

Here's the patch ( http://gppl.terminal.ru/ ), which allow
PostgreSQL use queries like
connect by id = prior parent_id

Isn't this the same patch that we rejected a year or two back?

as described in SQL standard...

AFAIK there is no such syntax in any version of the SQL standard.
The syntax that *is* there in SQL99 uses "WITH" to achieve roughly
the same results, but with much syntactic difference from Oracle.

If you'd like to submit a patch that implements spec-compatible
WITH, I can pass along some preliminary work that Andrew Overholt
did at Red Hat.

regards, tom lane