Re: [PROPOSAL] Max recursion depth in WITH Queries (Common Table Expressions)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PROPOSAL] Max recursion depth in WITH Queries (Common Table Expressions)
Дата
Msg-id 21358.1446044854@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PROPOSAL] Max recursion depth in WITH Queries (Common Table Expressions)  (Valery Popov <v.popov@postgrespro.ru>)
Список pgsql-hackers
Valery Popov <v.popov@postgrespro.ru> writes:
> 28.10.2015 16:33, Tom Lane �����:
>> The standard way of dealing with that is to include logic in the query to
>> limit the recursion depth, for example ...

> Yes, I agree with this thesis.  But I think in some cases would be 
> better to receive error message and stop execution than results will 
> incomplete.

Sure, but you can do that at the SQL level if you have a mind to, as well.

In practice, I think people tend to use recursive queries mainly for data
layouts where the maximum recursion depth isn't terribly clear, so that
setting this GUC to a useful value would be a difficult task anyway.
If you end up setting it to 100X or 1000X more than you think your queries
could possibly recurse, you might as well use some other approach like
statement_timeout, which has got a closer relationship to what you care
about, ie how long you want to wait.
        regards, tom lane



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

Предыдущее
От: Valery Popov
Дата:
Сообщение: Re: [PROPOSAL] Max recursion depth in WITH Queries (Common Table Expressions)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Add EXTRA_CFLAGS to configure