BUG #4465: GROUP BY is not to SQL standard

Поиск
Список
Период
Сортировка
От Tony Marston
Тема BUG #4465: GROUP BY is not to SQL standard
Дата
Msg-id 200810100947.m9A9lxnT009996@wwwmaster.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #4465: GROUP BY is not to SQL standard  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      4465
Logged by:          Tony Marston
Email address:      tony@marston-home.demon.co.uk
PostgreSQL version: 8.3.4
Operating system:   Windows XP
Description:        GROUP BY is not to SQL standard
Details:

The Postgresql implementation of GROUP BY does not conform to either the
1999 or 2003 SQL standard. The documentation states that every field in the
SELECT list which is not aggregated must be specified in the GROUP BY
clause. While this was true in the 1992 standard, in 1999 this was changed
to "any non-aggregated column appearing in the SELECT list is functionally
dependent upon the GROUP BY clause". In the example both p.name and p.price
are functionally dependent on product_id, therefore there is no need for
them to be included in the GROUP BY clause.

In this respect Postgresql is wrong and MySQL is right.

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "zhengzhong_zhou"
Дата:
Сообщение: BUG #4463: unique constraint error
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: BUG #4465: GROUP BY is not to SQL standard