Re: BUG #13863: Select from views gives wrong results

Поиск
Список
Период
Сортировка
От wrb
Тема Re: BUG #13863: Select from views gives wrong results
Дата
Msg-id E113617B-7B2F-45A8-9FE1-52711308E9D3@autistici.org
обсуждение исходный текст
Ответ на BUG #13863: Select from views gives wrong results  (wrb@autistici.org)
Список pgsql-bugs
<body class=3D"ApplePlainTextBody" dir=3D"auto" =
style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; =
-webkit-line-break: after-white-space;">Ooops, forgot to mail the =
list.WBegin forwarded =
message:From: wrb <wrb@autistici.org>Subject: Re: =
[BUGS] BUG #13863: Select from views gives wrong resultsDate: 14. =
ledna 2016 10:49:27 SE=C4=8CTo: Haribabu Kommi =
<kommi.haribabu@gmail.com>Followup: This query =
should show better what's wrong with the optimizer:select a, =
count(*)  from test group by cube (a);a | count =
---+-------1 |     12 | =
    1  |     2(3 =
rows)select * from (select a, count(*)  from test group by =
cube (a)) t where a is null;a | count ---+-------  | =
    0explain select * from (select a, =
count(*) from test group by cube (a)) t where a is null; =
            &n=
bsp;           &nbs=
p; QUERY PLAN =
            &n=
bsp;           &nbs=
p;  --------------------------------------------------------=
----------GroupAggregate  (cost=3D32.79..32.89 rows=3D2 =
width=3D4)  Group Key: test.a  Group Key: () =
 Filter: (test.a IS NULL)  ->  Sort =
 (cost=3D32.79..32.82 rows=3D11 width=3D4) =
       Sort Key: test.a =
       ->  Seq Scan on test =
 (cost=3D0.00..32.60 rows=3D11 width=3D4) =
            &n=
bsp;Filter: (a IS NULL)The predicate "a is null" in the =
outer select should refer to results of inner select and should =
therefore return (null, 2) instead of no rows, =
right?W=

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

Предыдущее
От: septian.hari@gmail.com
Дата:
Сообщение: BUG #13865: PQresultStatus returns PGRES_COPY_OUT instead of PGRES_FATAL_ERROR for certain bad COPY statement
Следующее
От: bloodjazman@gmail.com
Дата:
Сообщение: BUG #13867: apt.postgresql.org broken for postgresql-server-dev-9.4 and libpq-dev