Re: Syntax bug? Group by?
От | Mark Woodward |
---|---|
Тема | Re: Syntax bug? Group by? |
Дата | |
Msg-id | 18218.24.91.171.78.1161117949.squirrel@mail.mohawksoft.com обсуждение исходный текст |
Ответ на | Re: Syntax bug? Group by? (Peter Eisentraut <peter_e@gmx.net>) |
Ответы |
Re: Syntax bug? Group by?
|
Список | 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.
В списке pgsql-hackers по дате отправления: