Re: Stable function being evaluated more than once in a single query

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mark Liberman <mliberman(at)mixedsignals(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Stable function being evaluated more than once in a single query
Date: 2006-01-12 04:33:23
Message-ID: 935.1137040403@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-performance

Mark Liberman <mliberman(at)mixedsignals(dot)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

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Peter Eisentraut 2006-01-12 20:58:54 Re: [PATCHES] Summary table trigger example race condition
Previous Message Mark Liberman 2006-01-12 00:41:20 Stable function being evaluated more than once in a single query

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2006-01-12 04:45:49 Re: indexes on primary and foreign keys
Previous Message Robert Creager 2006-01-12 04:20:46 Re: Index isn't used during a join.