Re: One source of constant annoyance identified

From: Manfred Koizar <mkoi-pg(at)aon(dot)at>
To: "Markus Wollny" <Markus(dot)Wollny(at)computec(dot)de>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: One source of constant annoyance identified
Date: 2002-07-04 06:56:04
Message-ID: m5s7iu8o63q84jrd5pm3r6qsaddnca12am@4ax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 03 Jul 2002 21:09:24 +0200, I wrote:
>select MESSAGE.BOARD_ID
> , [...]
> , count(TH.THREAD_ID) as TFUID

Oops! COUNT won't work unless you add GRAOUP BY <all other fields> at
the end of the query. I had
CASE WHEN th.thread_id IS NULL THEN 0 ELSE 1 END
here and thoughtlessly replaced it by COUNT(...) for brevity. How
foolish!

Servus
Manfred

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Manfred Koizar 2002-07-04 07:31:32 Re: Query Analyzing
Previous Message Stephan Szabo 2002-07-04 06:26:44 Re: EVAL and SET equivalents in PostgreSQL