Stephan Szabo <[EMAIL PROTECTED]> writes: > If there were some way to pass a "limit" into SPI_prepare that was treated > similarly to a LIMIT clause for planning purposes but didn't actually > change the output plan to only return that number of rows, we could use > that.
Hmm ... the planner does have the ability to do that sort of thing (we use it for cursors). SPI_prepare doesn't expose the capability. Perhaps adding a SPI_prepare variant that does expose it would be the quickest route to a solution. I get a headache every time I look at the RI triggers ;-). Do they always know at the time of preparing a plan which way it will be used? regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to increase your free space map settings