Re: RECURSIVE allowed only ONCE in a CTE

Поиск
Список
Период
Сортировка
От Andrew Gierth
Тема Re: RECURSIVE allowed only ONCE in a CTE
Дата
Msg-id 87pnrkgmxe.fsf@news-spur.riddles.org.uk
обсуждение исходный текст
Ответ на RECURSIVE allowed only ONCE in a CTE  (Jitendra Loyal <jitendra.loyal@gmail.com>)
Ответы Re: RECURSIVE allowed only ONCE in a CTE  (Jitendra Loyal <jitendra.loyal@gmail.com>)
Список pgsql-general
>>>>> "Jitendra" == Jitendra Loyal <jitendra.loyal@gmail.com> writes:

 Jitendra> I find that the RECURSIVE can be used only once in a CTE.

RECURSIVE can be specified only once, but it applies to all CTEs at that
level. That is to say, RECURSIVE qualifies the preceding WITH, _not_ the
following CTE.

Note that just specifying RECURSIVE doesn't mean that any CTE is
recursive, it simply changes the name scoping rules such that CTEs _can_
be recursive. (Without it, a CTE's name is not in scope in its own body
so recursion is impossible.)

-- 
Andrew (irc:RhodiumToad)


В списке pgsql-general по дате отправления:

Предыдущее
От: Jitendra Loyal
Дата:
Сообщение: RECURSIVE allowed only ONCE in a CTE
Следующее
От: Jitendra Loyal
Дата:
Сообщение: Re: RECURSIVE allowed only ONCE in a CTE