Re: BUG #19713: WindowAgg qual pushdown gives wrong partition count when scale(numeric) distinguishes equal values - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #19713: WindowAgg qual pushdown gives wrong partition count when scale(numeric) distinguishes equal values
Date
Msg-id 1187008.1790094524@sss.pgh.pa.us
Whole thread
In response to BUG #19713: WindowAgg qual pushdown gives wrong partition count when scale(numeric) distinguishes equal values  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> An outer scale(numeric) predicate is pushed below WindowAgg even though
> numeric values 1.0 and 1.00 are equal under PARTITION BY semantics while
> scale() distinguishes them.

Isn't this a duplicate of your own bug #19697, as well as bug #19619?

What's missing from all of these reports is a reason why scale()
would be sane to apply to an aggregated column.  Such a query seems
inherently misguided to me, precisely because it is interrogating a
value that isn't guaranteed consistent across an aggregation group.
Is there a real-world use case here, and if so what is it?

            regards, tom lane

[1] https://www.postgresql.org/message-id/19697-6e7ccba388bbe858@postgresql.org
[2] https://www.postgresql.org/message-id/19619-fc646db1c6b2dc90@postgresql.org



pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #19712: MultiXact Recovery Deadlock
Next
From: Tom Lane
Date:
Subject: Re: BUG #19649: Qual pushdown into GROUP BY subqueries ignores non-equivalence-preserving references to grouping col