On Wed, 2006-04-19 at 18:23, Tom Lane wrote: > "Clodoaldo Pinto" <clodoaldo.pinto@xxxxxxxxx> 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 called() only once. > > No, it isn't. HOWEVER, depending on how you declare the function, you should be able to index it.