Daniel Grace <dgr...@wingsnw.com> writes: > No luck there either (runs, but with incorrect results), but since I know > this isn't a support list and is a bugs list I just would like to point out > that: Even though what I was doing that triggered the bug is apparently > incorrect and 'silly', it's still possible that some complicated legitimate > query might trigger the same problem -- so it may be worth looking into.
Yes, it's certainly a real bug, and we appreciate the bug report. My point is just that the reason it's gone undetected is that it's not a very useful case in practice; and in particular I don't believe that it's a case you need to solve your problem. (To be concrete, the failure case as I understand it is a sub-SELECT containing an aggregate call containing a sub-sub-SELECT, where the aggregate call actually belongs to the outermost query level according to the SQL nesting rules. This is not what you want because the aggregation is happening, or would happen except for the planner bug, with entirely the wrong scope for what you want.) regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs