BUG #18682: Null grouping set with empty table returns a row contains null.

Поиск
Список
Период
Сортировка
От PG Bug reporting form
Тема BUG #18682: Null grouping set with empty table returns a row contains null.
Дата
Msg-id 18682-1d820e9e8f60c369@postgresql.org
обсуждение исходный текст
Ответы Re: BUG #18682: Null grouping set with empty table returns a row contains null.
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      18682
Logged by:          Yue Xingzhi
Email address:      459850212@qq.com
PostgreSQL version: 15.0
Operating system:   CentOS
Description:

The test case is quite simple

create table qt1 (c_bigint bigint,b  bit(1));
SELECT avg(qt1.c_bigint) as c1 FROM qt1 GROUP BY grouping sets(()); --
returns one row
SELECT avg(qt1.c_bigint) as c1 FROM qt1 GROUP BY grouping sets((b)); --
returns no rows

As one would intuitively expect, empty table should return no rows for empty
grouping set. Oracle also returns no rows

Could you please explain the behavior or if it is buggy? Thx


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