Re: BUG #5385: gd disallows agg function in subselect of update

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Corin <wakathane(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5385: gd disallows agg function in subselect of update
Date: 2010-03-20 15:30:27
Message-ID: 6942.1269099027@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Corin <wakathane(at)gmail(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Oleg K 2010-03-21 21:25:36 9.0_alpha4 Planner Bug
Previous Message Corin 2010-03-20 11:56:07 Re: BUG #5385: gd disallows agg function in subselect of update