From: | Rod Taylor <rbt(at)rbt(dot)ca> |
---|---|
To: | Evgen Potemkin <evgent(at)ns(dot)terminal(dot)ru> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Proposal of hierachical queries (a la Oracle) |
Date: | 2002-11-15 17:02:17 |
Message-ID: | 1037379736.14810.37.camel@jester |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, 2002-11-14 at 06:52, Evgen Potemkin wrote:
> Hi there!
>
> I want to propose the patch for adding the hierarchical queries posibility.
> It allows to construct queries a la Oracle for ex:
> SELECT a,b FROM t CONNECT BY a PRIOR b START WITH cond;B
Great addition. But please use the SQL 99 syntax for recursive queries
(if you need the full segment, I can send them to you):
Section 7.13 of Part 2:
Format
<search or cycle clause> ::=
<search clause>
| <cycle clause>
| <search clause> <cycle clause>
<search clause> ::=
SEARCH <recursive search order> SET <sequence column>
<recursive search order> ::=
DEPTH FIRST BY <sort specification list>
| BREADTH FIRST BY <sort specification list>
<sequence column> ::= <column name>
<cycle clause> ::=
CYCLE <cycle column list>
SET <cycle mark column> TO <cycle mark value>
DEFAULT <non-cycle mark value>
USING <path column>
<cycle column list> ::=
<cycle column> [ { <comma> <cycle column> }... ]
<cycle column> ::= <column name>
<cycle mark column> ::= <column name>
<path column> ::= <column name>
<cycle mark value> ::= <value expression>
<non-cycle mark value> ::= <value expression>
--
Rod Taylor <rbt(at)rbt(dot)ca>
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2002-11-15 17:03:23 | Re: Time to move on... |
Previous Message | Rod Taylor | 2002-11-15 16:43:47 | Re: pg_dump in 7.4 |