Proposal of hierachical queries (a la Oracle)

Поиск
Список
Период
Сортировка
Искать

Proposal of hierachical queries (a la Oracle)

От:
Evgen Potemkin <evgent@ns.terminal.ru>
Дата:
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

I've seen this type of queries often made by adding a new type, which stores
position of row in the tree. But sorting such tree are very tricky (i think).

Patch allows result tree to be sorted, i.e. subnodes of each node will be
sorted by ORDER BY clause.

with regards, evgen

---
.evgen


Re: Proposal of hierachical queries (a la Oracle)

От:
Rod Taylor <rbt@rbt.ca>
Дата:
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  SET 
         ::=               DEPTH FIRST BY              | BREADTH FIRST BY 
         ::= 
         ::=             CYCLE              SET  TO              DEFAULT              USING 
         ::=              [ {   }... ]
         ::= 
         ::= 
         ::= 
         ::= 
         ::= 

-- 
Rod Taylor 

Re: Proposal of hierachical queries (a la Oracle)

От:
Evgen Potemkin <evgent@ns.terminal.ru>
Дата:
Ok, full section would be very helpful, i don't have it.

---
.evgen

On 15 Nov 2002, Rod Taylor wrote:

> 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:
>


FAQ