Paul Ramsey <pramsey at cleverelephant.ca> writes: > That patch seems to make a salutary difference, at least against this > workload... there is now no difference between the > query-with-immutable-function and the bare query. FYI, I've applied this patch for 8.4.1 and up. regards, tom lane