Re: WITH RECURSIVE patches V0.1 TODO items
От | Michael Meskes |
---|---|
Тема | Re: WITH RECURSIVE patches V0.1 TODO items |
Дата | |
Msg-id | 20080527101731.GC26436@feivel.credativ.de обсуждение исходный текст |
Ответ на | Re: WITH RECURSIVE patches V0.1 TODO items (Tatsuo Ishii <ishii@postgresql.org>) |
Список | pgsql-hackers |
On Tue, May 27, 2008 at 04:40:41PM +0900, Tatsuo Ishii wrote: > - EXCEPT which has a recursive query name in the right hand operator > is not allowed > > - function which has recursive query name as an operator is not > allowed > > - subquery which includes a recursive query name is not allowed. Note > that in the most outer query in the WITH clause subquery which > includes a recursive query name is allowed > > - query which has a selection list including recursive query name > and aggregate function is not allowed > > - query which has a selection list including recursive query name > and HAVING clause > > - query including recursive query name and INTERSECT ALL or EXCEPT > ALL is not allowed > > - query including recursive query name and FULL OUTER JOIN is not > allowed > > - outer join query is not allowed if the right hand side of LEFT OUTER > JOIN has recursive query name > > - outer join query is not allowed if the left hand side of RIGHT OUTER > JOIN has recursive query name Ah, the standard already has this. Tatsuo-san you might remember us talking about negative subqueries. This is exactly the reason for most of these rules. A recursively defined table referencing itself negativly will only be evaluatable under special circumstances and with the right set of data. I take it all these rule refer to using the recursive query inside its own definition. It's perfectly fine to use a recursively defined query inside another with clause defining a different query as a subselect. Michael -- Michael Meskes Email: Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org) ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org Go VfL Borussia! Go SF 49ers! Use Debian GNU/Linux! Use PostgreSQL!
В списке pgsql-hackers по дате отправления: