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

From David Rowley
Subject Re: BUG #17502: View based on window functions returns wrong results when queried
Date
Msg-id CAApHDvr94vSvxm4j_ykMBapFLXC8H_ntLg7oD5fhqfqR0x-snA@mail.gmail.com
Whole thread Raw
In response to Re: BUG #17502: View based on window functions returns wrong results when queried  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Mon, 30 May 2022 at 15:02, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 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.

Yeah, perhaps. But we have received a report from 1 person and I think
it seems strange to adopt a policy that we require multiple bug
reports for the same issue before we consider fixing.

FWIW, just to demonstrate what a fix could look like, I've attached a
patch. I'm not planning to commit it if you really think we shouldn't
be fixing it.

The patch also does nothing for the weirdness that I described in the
DISTINCT ON case earlier in this thread.

David

Attachment

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #17502: View based on window functions returns wrong results when queried
Next
From: Michael Paquier
Date:
Subject: Re: BUG #17485: Records missing from Primary Key index when doing REINDEX INDEX CONCURRENTLY