Re: Can functions containing a CTE be PARALLEL SAFE?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Can functions containing a CTE be PARALLEL SAFE?
Дата
Msg-id 19531.1571304003@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Can functions containing a CTE be PARALLEL SAFE?  (Erwin Brandstetter <brsaweda@gmail.com>)
Ответы Re: Can functions containing a CTE be PARALLEL SAFE?  (Erwin Brandstetter <brsaweda@gmail.com>)
Список pgsql-general
Erwin Brandstetter <brsaweda@gmail.com> writes:
>> The following operations are always parallel restricted.
>> - Scans of common table expressions (CTEs).

> Now I am unsure whether I can use `PARALLEL SAFE` for functions containing
> a CTE (while  fulfilling all other criteria)?

AFAIR, the reason for treating CTEs as parallel restricted is simply to
guarantee single evaluation of the CTE.  Within a function, that would
only matter per-function-execution, so I can't see why a function
containing such a query couldn't be pushed down to workers for execution.

            regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Has there been any discussion of custom dictionaries being defined in the database?
Следующее
От: Morris de Oryx
Дата:
Сообщение: Re: Has there been any discussion of custom dictionaries beingdefined in the database?