Re: Syntax bug? Group by?

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

Предыдущее
От: Shane Ambler
Дата:
Сообщение: Re: Syntax bug? Group by?
Следующее
От: Chris Campbell
Дата:
Сообщение: Re: Syntax bug? Group by?