Re: [HACKERS] IMMUTABLE break inlining simple SQL functions.

2009-08-02 Thread Tom Lane
Pavel Stehule writes: > I though, so simple SQL functions should be inlined everywhere. When I > tested sample for recent discussion, I found so immutable flag breaks > inlining. Your example proves nothing of the sort, since you have forgotten to allow for immutable functions being folded to con

[HACKERS] IMMUTABLE break inlining simple SQL functions.

2009-08-02 Thread Pavel Stehule
Hello I though, so simple SQL functions should be inlined everywhere. When I tested sample for recent discussion, I found so immutable flag breaks inlining. Is it bug? postgres=# create or replace function foo(a int) returns int as $$ select $1+1$$ language sql STRICT IMMUTABLE; CREATE FUNCTION