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 3730546.1653879769@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
List pgsql-bugs
David Rowley <dgrowleyml@gmail.com> writes:
> On Mon, 30 May 2022 at 14:45, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> We could leave it alone in the back branches on the grounds that if
>> you like the results you get, we shouldn't break it in a minor
>> release.

> I struggle to see how anyone would like their result correctness to
> depend on whether remove_unused_subquery_outputs() is able or unable
> to remove a column from the subquery.

Indeed, it's unlikely that anybody would like these particular
results.  But perhaps somebody is running an application that does
this and happens to not trip over any obviously-wrong case; for
example, if one always selects all columns from this view, the
issue is not apparent.

I'm not necessarily against adding the prohibition in the back
branches.  However, if this has been wrong since 10.x (if not
further back) then it seems like few people are tripping over
the inconsistency.

            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