Re: Recursive queries?

Поиск
Список
Период
Сортировка
От Hannu Krosing
Тема Re: Recursive queries?
Дата
Msg-id 1075912946.3122.40.camel@fuji.krosing.net
обсуждение исходный текст
Ответ на Re: Recursive queries?  (Christopher Browne <cbbrowne@acm.org>)
Список pgsql-hackers
Christopher Browne kirjutas K, 04.02.2004 kell 15:10:

> The fact that the form of this resembles that of the Lisp/ML "let"
> forms means that WITH can be useful in structuring queries as well.
> For instance, supposing you're computing a value that gets used
> several times, putting it into a WITH clause might allow evading the
> need to compute it more than once.

The main difference between giving the subquery in WITH and in FROM, is
that the subqueries given in FROM claues don't see each other, while the
ones given in WITH see the ones preceeding them and the ones in WITH
RECURSIVE see all queries in the WITH RECURSIVE clause.

--------------
Hannu



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

Предыдущее
От: Hannu Krosing
Дата:
Сообщение: Re: Recursive queries?
Следующее
От: strk
Дата:
Сообщение: Re: PostGIS Integration