Re: division by zero issue
| От | Tom Lane |
|---|---|
| Тема | Re: division by zero issue |
| Дата | |
| Msg-id | 5853.1095271283@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: division by zero issue (Greg Donald <destiney@gmail.com>) |
| Ответы |
Re: division by zero issue
|
| Список | pgsql-general |
Greg Donald <destiney@gmail.com> writes:
> On Wed, 15 Sep 2004 12:55:24 -0400, Jean-Luc Lachance
> <jllachan@sympatico.ca> wrote:
>> Add :
>> AND count(user_tasks.task_id) > 0 in the where clause.
> I get the error:
> aggregates not allowed in WHERE clause
You need to put it in HAVING, instead.
Note also this 7.4.4 bug fix:
* Check HAVING restriction before evaluating result list of an aggregate plan
which means that this isn't really gonna work unless you are on 7.4.5.
(It's fairly astonishing that no one noticed we were doing this in the
wrong order until recently, but no one did ...)
regards, tom lane
В списке pgsql-general по дате отправления: