Re: Proposing WITH ITERATIVE
От | Peter Eisentraut |
---|---|
Тема | Re: Proposing WITH ITERATIVE |
Дата | |
Msg-id | cf26b533-3d82-11d6-179d-dbcb3a698e3d@2ndquadrant.com обсуждение исходный текст |
Ответ на | Re: Proposing WITH ITERATIVE (Fabien COELHO <coelho@cri.ensmp.fr>) |
Ответы |
Re: Proposing WITH ITERATIVE
|
Список | pgsql-hackers |
On 2020-04-29 07:09, Fabien COELHO wrote: > I'm wondering about how to use such a feature in the context of WITH query > with several queries having different behaviors. Currently "WITH" > introduces a named-query (like a view), "WITH RECURSIVE" introduces a mix > of recursive and named queries, pg really sees whether each one is > recursive or not, and "RECURSIVE" is required but could just be guessed. Yeah the RECURSIVE vs ITERATIVE is a bit of a red herring here. As you say, the RECURSIVE keyword doesn't specify the processing but marks the fact that the specification of the query is recursive. I think a syntax that would fit better within the existing framework would be something like WITH RECURSIVE t AS ( SELECT base case REPLACE ALL -- instead of UNION ALL SELECT recursive case ) -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-hackers по дате отправления: