Re: BUG #5385: gd disallows agg function in subselect of update - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #5385: gd disallows agg function in subselect of update
Date
Msg-id 6942.1269099027@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #5385: gd disallows agg function in subselect of update  (Corin <wakathane@gmail.com>)
List pgsql-bugs
Corin <wakathane@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

pgsql-bugs by date:

Previous
From: Corin
Date:
Subject: Re: BUG #5385: gd disallows agg function in subselect of update
Next
From: Oleg K
Date:
Subject: 9.0_alpha4 Planner Bug