How can i declare non-inline function in postgresql? Only with adding 'out' argument?
Is table functions(returns table) inline?
1 Answer
Inlining is always an optimization1 - this means that "the system" will perform inlining only when it is sure that the result is just the same as without inlining.
So: If you ask "how can I prevent inlining" you should better ask "What I'm doing wrong or why behaves "the system" wrong?" and solve that problem.
1 Whether a successfull optimizazion or not is not the question here.
2 Comments
nyaapa
Ok, can this function can be inlined? create function Tabli() returns table(Type character varying(15), Cost bigint) AS $$ begin return query select "Type", sum("Cost") from "tblProject" group by "Type"; end; $$ language plpgsql;
nyaapa
Thank for your answer, i have read documentation one more time and understand inline oprimization.