Michael Fuhr <[EMAIL PROTECTED]> writes: > On Sat, Sep 03, 2005 at 04:29:25PM -0400, Allan Wang wrote: >> Extra columns seem to be on sum(plays.length), videos.path, videoid
> Here's a simplified, complete test case: Thanks for the test case. The bug seems to be introduced by the code I added a couple months ago to eliminate unnecessary SubqueryScan plan nodes: the Limit node ends up with a targetlist different from its immediate input node, which is wrong because Limit doesn't do any projection, only pass on its input tuples (or not). There are probably related cases involving Sort nodes (ORDER BY on a sub-select) and other plan nodes that don't do projection. Haven't decided on an appropriate fix yet --- seems we have to either prevent the SubqueryScan from being removed in this context, or fix the tlist of the parent node. Don't know which will be less messy. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings