Re: Avoid excessive inlining?

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: Avoid excessive inlining?
Дата
Msg-id bfe8c0f43c5211c71645071c6190dae259f08236.camel@cybertec.at
обсуждение исходный текст
Ответ на Re: Avoid excessive inlining?  (Philip Semanchuk <philip@americanefficient.com>)
Ответы Re: Avoid excessive inlining?
Re: Avoid excessive inlining?
Список pgsql-general
On Mon, 2020-12-21 at 11:45 -0500, Philip Semanchuk wrote:
> > On Dec 19, 2020, at 12:59 AM, Joel Jacobson <joel@compiler.org> wrote:
> > Is there a way to avoid excessive inlining when writing pure SQL functions, without having to use PL/pgSQL?
> 
> The rules for inlining are here:
> https://wiki.postgresql.org/wiki/Inlining_of_SQL_functions
> 
> According to those rules, if you declared your SQL function as VOLATILE, then Postgres wouldn’t
>  inline it. From your question, I’m not sure if you want to have the same function inlined
>  sometimes and not others. I can’t think of a way to do that offhand.

Where do you see that?  As far as I know, VOLATILE is the best choice if you
want the function to be inlined.

I would say that the simplest way to prevent a function from being inlined
is to set a parameter on it:

  ALTER FUNCTION f() SET enable_seqscan = on;

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




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

Предыдущее
От: Paul Förster
Дата:
Сообщение: Re: pg_upgrade question
Следующее
От: Philip Semanchuk
Дата:
Сообщение: Re: Avoid excessive inlining?