Using non-grouping-keys at HAVING clause

Поиск
Список
Период
Сортировка
От Kohei KaiGai
Тема Using non-grouping-keys at HAVING clause
Дата
Msg-id CAOP8fzbzmDRZj4zHb_nCGCW6YM6RhemHgwnwAK4KFPh8LXpR7g@mail.gmail.com
обсуждение исходный текст
Ответы Re: Using non-grouping-keys at HAVING clause  (Vik Fearing <vik@postgresfriends.org>)
Список pgsql-hackers
Hello,

I got a trouble report here:
https://github.com/heterodb/pg-strom/issues/636

It says that PG-Strom raised an error when the HAVING clause used
non-grouping-keys,
even though the vanilla PostgreSQL successfully processed the query.

SELECT MAX(c0) FROM t0 GROUP BY t0.c1 HAVING t0.c0<MIN(t0.c0);

However, I'm not certain what is the right behavior here.
The "c0" column does not appear in the GROUP BY clause, thus we cannot
know its individual
values after the group-by stage, right?
So, what does the "HAVING t0.c0<MIN(t0.c0)" evaluate here?

Best regards,
-- 
HeteroDB, Inc / The PG-Strom Project
KaiGai Kohei <kaigai@heterodb.com>



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

Предыдущее
От: Ashutosh Bapat
Дата:
Сообщение: Re: Oversight in reparameterize_path_by_child leading to executor crash
Следующее
От: Dilip Kumar
Дата:
Сообщение: Re: CHECK Constraint Deferrable