Re: inlining SQL functions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: inlining SQL functions
Дата
Msg-id 7290.1272222786@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: inlining SQL functions  (Jim Nasby <decibel@decibel.org>)
Ответы Re: inlining SQL functions
Список pgsql-hackers
Jim Nasby <decibel@decibel.org> writes:
> On Apr 2, 2010, at 12:12 PM, Tom Lane wrote:
>> If you're thinking of just replacing the call with a sub-SELECT
>> construct, that's no good in general because it would change the
>> semantics.

> Since Alexey was working on this for us, I'll elaborate. The actual
> use case is below.

There are two reasons why that function doesn't get inlined: it's not
declared to return SETOF, and it's (implicitly) declared VOLATILE.
If you make it SETOF and STABLE, it'll get inlined.  Both of those
things change the semantics, so it's hard to do inlining otherwise.
        regards, tom lane


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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: testing HS/SR - 1 vs 2 performance
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: global temporary tables