Re: [GENERAL] overhead of plpgsql functions over simple select

2008-10-24 Thread Ivan Sergio Borgonovo
On Fri, 24 Oct 2008 07:03:35 +0200 "Pavel Stehule" <[EMAIL PROTECTED]> wrote: > 2008/10/24 Tom Lane <[EMAIL PROTECTED]>: > > "Pavel Stehule" <[EMAIL PROTECTED]> writes: > >> postgres=# create function simplefce(a int, b int) returns int > >> as $$select $1 + $2$$ language sql immutable strict; > >

Re: [GENERAL] overhead of plpgsql functions over simple select

2008-10-23 Thread Pavel Stehule
2008/10/24 Tom Lane <[EMAIL PROTECTED]>: > "Pavel Stehule" <[EMAIL PROTECTED]> writes: >> postgres=# create function simplefce(a int, b int) returns int as >> $$select $1 + $2$$ language sql immutable strict; >> CREATE FUNCTION >> postgres=# create function simplefce1(a int, b int) returns int as >

Re: [GENERAL] overhead of plpgsql functions over simple select

2008-10-23 Thread Tom Lane
"Pavel Stehule" <[EMAIL PROTECTED]> writes: > postgres=# create function simplefce(a int, b int) returns int as > $$select $1 + $2$$ language sql immutable strict; > CREATE FUNCTION > postgres=# create function simplefce1(a int, b int) returns int as > $$begin return a+b; end;$$ language plpgsql im

Re: [GENERAL] overhead of plpgsql functions over simple select

2008-10-23 Thread Pavel Stehule
Hello postgres=# create function simplefce(a int, b int) returns int as $$select $1 + $2$$ language sql immutable strict; CREATE FUNCTION postgres=# create function simplefce1(a int, b int) returns int as $$begin return a+b; end;$$ language plpgsql immutable strict; CREATE FUNCTION postgres=# pos

[GENERAL] overhead of plpgsql functions over simple select

2008-10-23 Thread Ivan Sergio Borgonovo
I'd like to encapsulate something that now is just a simple select in a plpgsql function now just to keep an interface consistent but even for well... encapsulating the sql. Right now a simple select statement will suffice. What kind of overhead a plpgsql that just return a select incur compared