Re: [GENERAL] Calling the same function more than once with the same arguments

2006-04-20 Thread Clodoaldo Pinto
2006/4/19, Ben <[EMAIL PROTECTED]>: > Look into the immutable flag on function creation: I have read that section and I'm still not sure about it. This is the caller() function: create or replace function caller(int4) returns some_type as $body$ select array(select distinct a from called($1)

Re: [GENERAL] Calling the same function more than once with the same arguments

2006-04-20 Thread Clodoaldo Pinto
2006/4/19, Ben <[EMAIL PROTECTED]>: > Look into the immutable flag on function creation: > > http://www.postgresql.org/docs/8.1/interactive/xfunc-volatility.html > That is what I needed to know, Thanks. Regards, Clodoaldo Pinto ---(end of broadcast)---

Re: [GENERAL] Calling the same function more than once with the same arguments

2006-04-19 Thread Tom Lane
"Clodoaldo Pinto" <[EMAIL PROTECTED]> writes: > I'm building a function caller() in which a certain function called() > will be called many times in from clauses with the same arguments and > I'm wondering if is there a performance penalty for that or if the sql > engine is smart enough to call cal

[GENERAL] Calling the same function more than once with the same arguments

2006-04-19 Thread Clodoaldo Pinto
I'm building a function caller() in which a certain function called() will be called many times in from clauses with the same arguments and I'm wondering if is there a performance penalty for that or if the sql engine is smart enough to call called() only once. I tried to substitute called() in th