Corin <wakath...@gmail.com> writes: > Sorry, stupid me - it's not a bug, pg is perfectly right! > The query was just wrong, because I used the wrong column in the > SUM(...) function.
Yah. The reason the error message was phrased that way is that the SUM argument is a variable of the outer query, so the aggregate is also considered an aggregate of the outer query. 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