Re: Calling the same function more than once with the - Mailing list pgsql-general

From Scott Marlowe
Subject Re: Calling the same function more than once with the
Date
Msg-id 1145542319.23538.127.camel@state.g2switchworks.com
Whole thread Raw
In response to Re: Calling the same function more than once with the same arguments  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Wed, 2006-04-19 at 18:23, Tom Lane wrote:
> "Clodoaldo Pinto" <clodoaldo.pinto@gmail.com> 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.

pgsql-general by date:

Previous
From: "Jim Buttafuoco"
Date:
Subject: Re: Query to check existence of stored procedure?
Next
From: Tom Lane
Date:
Subject: Re: FW: code to cancel a running query, worker thread