Re: Syntax bug? Group by? - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Syntax bug? Group by?
Date
Msg-id 200610172119.18316.peter_e@gmx.net
Whole thread Raw
In response to Syntax bug? Group by?  ("Mark Woodward" <pgsql@mohawksoft.com>)
Responses Re: Syntax bug? Group by?  (Chris Campbell <chris@bignerdranch.com>)
Re: Syntax bug? Group by?  ("Mark Woodward" <pgsql@mohawksoft.com>)
List pgsql-hackers
Mark Woodward wrote:
> 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

This would require a great deal of special-casing, in particular 
knowledge of the = operator, and then the restriction to a particular 
form of the WHERE clause.  For overall consistency, I don't think this 
should be allowed.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/


pgsql-hackers by date:

Previous
From: Shane Ambler
Date:
Subject: Re: Syntax bug? Group by?
Next
From: Chris Campbell
Date:
Subject: Re: Syntax bug? Group by?