Re: BUG #17502: View based on window functions returns wrong results when queried - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #17502: View based on window functions returns wrong results when queried
Date
Msg-id 3722616.1653877139@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #17502: View based on window functions returns wrong results when queried  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: BUG #17502: View based on window functions returns wrong results when queried
Re: BUG #17502: View based on window functions returns wrong results when queried
List pgsql-bugs
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.

            regards, tom lane



pgsql-bugs by date:

Previous
From: David Rowley
Date:
Subject: Re: BUG #17502: View based on window functions returns wrong results when queried
Next
From: David Rowley
Date:
Subject: Re: BUG #17502: View based on window functions returns wrong results when queried