Syntax bug? Group by?

From: "Mark Woodward" <pgsql(at)mohawksoft(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Syntax bug? Group by?
Date: 2006-10-17 15:34:58
Message-ID: 18370.24.91.171.78.1161099298.squirrel@mail.mohawksoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Shouldn't this work?

select ycis_id, min(tindex), avg(tindex) from y where ycis_id = 15;

ERROR: column "y.ycis_id" must appear in the GROUP BY clause or be used
in an aggregate function

If I am asking for a specific column value, should I, technically
speaking, need to group by that column?

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2006-10-17 15:36:17 Re: hacking postgres hashjoin algorithm
Previous Message Tom Lane 2006-10-17 13:46:44 Re: postgres database crashed