Re: IMMUTABLE and PARALLEL SAFE function markings

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: IMMUTABLE and PARALLEL SAFE function markings
Дата
Msg-id CA+TgmoYT5jOD0mC2jsdBCWG4yabhUKRCh_7Wopo6S1FZQkwC+A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: IMMUTABLE and PARALLEL SAFE function markings  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Список pgsql-hackers
On Mon, Nov 26, 2018 at 11:20 PM Andrew Gierth
<andrew@tao11.riddles.org.uk> wrote:
> But the combination of inlining and polymorphism, in particular, makes
> it impossible for the function author to know this. Take the OP's
> example; it is parallel safe if and only if the selected type's equal
> function is parallel safe - how is the author supposed to know? What if
> the type is one installed later?

I think you have to set it conservatively.  It's easy to construct all
kinds of cases where a function is sometimes parallel-safe and
sometimes not depending on the parameters passed to it, but we don't
have any way to indicate that right now -- and I'm not entirely
convinced that we need one.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: IMMUTABLE and PARALLEL SAFE function markings
Следующее
От: Andrew Gierth
Дата:
Сообщение: Re: IMMUTABLE and PARALLEL SAFE function markings