From: | "Mark Woodward" <pgsql(at)mohawksoft(dot)com> |
---|---|
To: | "Peter Eisentraut" <peter_e(at)gmx(dot)net> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Syntax bug? Group by? |
Date: | 2006-10-17 20:45:49 |
Message-ID: | 18218.24.91.171.78.1161117949.squirrel@mail.mohawksoft.com |
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.
>
Well, this started out as a "huh, that's funny, that should work, is that
a bug?" and is turning into a search through the SQL99 spec for a clear
answer. I've already worked around it, but to me, at least, it seems it
should work.
From | Date | Subject | |
---|---|---|---|
Next Message | Mark Woodward | 2006-10-17 20:47:23 | Re: Syntax bug? Group by? |
Previous Message | Alvaro Herrera | 2006-10-17 20:43:41 | Re: more anti-postgresql FUD |