Re: Stable function being evaluated more than once in a single query - Mailing list pgsql-performance

From Tom Lane
Subject Re: Stable function being evaluated more than once in a single query
Date
Msg-id 935.1137040403@sss.pgh.pa.us
Whole thread Raw
In response to Stable function being evaluated more than once in a single query  (Mark Liberman <mliberman@mixedsignals.com>)
Responses Re: Stable function being evaluated more than once in a single query  ("Jim C. Nasby" <jnasby@pervasive.com>)
List pgsql-performance
Mark Liberman <mliberman@mixedsignals.com> writes:
> I've got a set-returning function,  defined as STABLE, that I reference twice
> within a single query, yet appears to be evaluated via two seperate function
> scans.

There is no guarantee, express or implied, that this won't be the case.

(Seems like we just discussed this a couple days ago...)

            regards, tom lane

pgsql-performance by date:

Previous
From: Robert Creager
Date:
Subject: Re: Index isn't used during a join.
Next
From: Tom Lane
Date:
Subject: Re: indexes on primary and foreign keys