Re: Syntax bug? Group by?

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Cc: "Mark Woodward" <pgsql(at)mohawksoft(dot)com>
Subject: Re: Syntax bug? Group by?
Date: 2006-10-17 19:19:17
Message-ID: 200610172119.18316.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chris Campbell 2006-10-17 20:00:26 Re: Syntax bug? Group by?
Previous Message Shane Ambler 2006-10-17 18:58:48 Re: Syntax bug? Group by?