Mark Liberman <mliberman@xxxxxxxxxxxxxxxx> 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