public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: David Rowley <[email protected]>
Cc: Daniel Farkaš <[email protected]>
Cc: Magnus Hagander <[email protected]>
Cc: PostgreSQL mailing lists <[email protected]>
Subject: Re: BUG #17502: View based on window functions returns wrong results when queried
Date: Sun, 29 May 2022 23:02:49 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAApHDvpacAbOTYeTPCgKnafUOvJT0=dFP0q+eVhOhB2Yaa8+QQ@mail.gmail.com>
References: <[email protected]>
	<CABUevEz7t3OWxaSSVSHOxa5KcYioOk=yRwoL3iMViyZQ8m2wAw@mail.gmail.com>
	<CAGckUK2GLF=d9J5ErEWgK5x8ECqCw4equnq3jEzrqtfJw+iHYw@mail.gmail.com>
	<CAApHDvoR4BXm7oxSrYhpEAFOZ-qMPkkYnn14y6sxtPf=5w5OOw@mail.gmail.com>
	<[email protected]>
	<CAApHDvp5dapiG2PBSYz+Yps+LGEwr8bY_NoUr1+=rn9oL+NfPA@mail.gmail.com>
	<[email protected]>
	<CAApHDvpacAbOTYeTPCgKnafUOvJT0=dFP0q+eVhOhB2Yaa8+QQ@mail.gmail.com>

David Rowley <[email protected]> writes:
> On Mon, 30 May 2022 at 14:45, Tom Lane <[email protected]> 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





view thread (18+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: BUG #17502: View based on window functions returns wrong results when queried
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox