Re: WITH and WITH RECURSIVE in single query
От
David Johnston
Тема
Re: WITH and WITH RECURSIVE in single query
Дата
Msg-id
8F745C3E-E709-4491-902C-DF9A84958B5B@yahoo.com
Ответ на
WITH and WITH RECURSIVE in single query (Maxim Boguk)
Список
Дерево обсуждения
WITH and WITH RECURSIVE in single query Maxim Boguk <maxim.boguk@gmail.com>
Re: WITH and WITH RECURSIVE in single query Tom Lane <tgl@sss.pgh.pa.us>
Re: WITH and WITH RECURSIVE in single query David Johnston <polobo@yahoo.com>
Re: WITH and WITH RECURSIVE in single query Maxim Boguk <maxim.boguk@gmail.com>
Re: WITH and WITH RECURSIVE in single query David Johnston <polobo@yahoo.com>
Re: WITH and WITH RECURSIVE in single query Maxim Boguk <maxim.boguk@gmail.com>
On Dec 4, 2011, at 22:28, Maxim Boguk wrote: > Hi. > > Is here any way to combine WITH and WITH RECURSIVE into single query? > > Something like: > > WITH t AS (some complicated select to speed up recursive part), > RECURSIVE r AS > ( > ... > UNION ALL > ... > ) > > ? > > -- > Maxim Boguk > Senior Postgresql DBA. WITH RECURSIVE q1 As (), q2 AS () ... Add RECURSIVE after the WITH; it then applies to any/all the CTEs. Look at the specification (and description) in the SELECT documentation closely. David J.
В списке pgsql-general по дате отправления
От: Maxim Boguk
Дата: