Re: We are not following the spec for HAVING without GROUP

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: We are not following the spec for HAVING without GROUP
Дата
Msg-id 11032.1110429895@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: We are not following the spec for HAVING without GROUP  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Список pgsql-hackers
Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:
>>> Comments?  Can anyone confirm whether DB2 or other databases allow
>>> ungrouped column references with HAVING?

> MySQL allows it:

A slightly tighter experiment shows that they treat HAVING like WHERE
in this case:

mysql> create table tab(col int);
Query OK, 0 rows affected (0.00 sec)

mysql> insert into tab values(1);
Query OK, 1 row affected (0.00 sec)

mysql> insert into tab values(2);
Query OK, 1 row affected (0.01 sec)

mysql> select col from tab having col>1;
+------+
| col  |
+------+
|    2 |
+------+
1 row in set (0.00 sec)

I think it's fairly likely that they copied our misinterpretation ...
        regards, tom lane


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

Предыдущее
От: Oleg Bartunov
Дата:
Сообщение: Re: pgpool question
Следующее
От: Tom Lane
Дата:
Сообщение: Re: We are not following the spec for HAVING without GROUP BY