Re: BUG #17502: View based on window functions returns wrong results when queried
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Rowley <dgrowleyml@gmail.com>
Cc: Daniel Farkaš <daniel.farkas@datoris.com>, Magnus Hagander <magnus@hagander.net>, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2022-05-30T03:02:49Z
Lists: 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
Commits
-
Disallow set-returning functions within window OVER clauses.
- 1de468099d27 master landed
- 0c15b715c651 19 (unreleased) landed