Re: BUG #17502: View based on window functions returns wrong results when queried

Поиск
Список
Период
Сортировка
От Ilya Anfimov
Тема Re: BUG #17502: View based on window functions returns wrong results when queried
Дата
Msg-id 20220530102753.GA2725032@azor.tzirechnoy.ru
обсуждение исходный текст
Ответ на Re: BUG #17502: View based on window functions returns wrong results when queried  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On Sun, May 29, 2022 at 10:18:59PM -0400, Tom Lane wrote:
> David Rowley <dgrowleyml@gmail.com> writes:
> > The problem seems to be down to the fact that
> > remove_unused_subquery_outputs() does not check if the to-be-removed
> > target entry references WindowClauses which contain set-returning
> > functions.
> 
> I was sort of wondering why we allow SRFs in this context in the
> first place.  The results don't seem terribly well-defined to me.
> In particular, a WindowFunc invocation is not supposed to change the
> number of rows in the query result, and yet this one is doing so.
 
 I  would like to note, that some SRFs may return only one row in
specific cases, like dblink() with the specific query.
 It may used much more often, than real multirow SRFs in PARTITION BY.

 While converting it to a LATERAL JOIN is not  a lot  of work  --
breaking it in previous versions may affect a lot of people.




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

Предыдущее
От: Richard Guo
Дата:
Сообщение: Re: BUG #17502: View based on window functions returns wrong results when queried
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17503: Package postgresql-jdbc-42.3.6-1.rhel8.noarch.rpm is not signed