pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: imchifan@163.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #19713: WindowAgg qual pushdown gives wrong partition count when scale(numeric) distinguishes equal values
Date: Tue, 22 Sep 2026 12:28:44 -0400
Message-ID: <1187008.1790094524@sss.pgh.pa.us> (raw)
In-Reply-To: <19713-635b8656d07464df@postgresql.org>
References: <19713-635b8656d07464df@postgresql.org>

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





view thread (2+ messages)

Message-ID: <1187008.1790094524@sss.pgh.pa.us>
Permalink:  ../1187008.1790094524@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1187008.1790094524@sss.pgh.pa.us

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, imchifan@163.com
  Subject: Re: BUG #19713: WindowAgg qual pushdown gives wrong partition count when scale(numeric) distinguishes equal values
  In-Reply-To: <1187008.1790094524@sss.pgh.pa.us>
  References: <19713-635b8656d07464df@postgresql.org> <1187008.1790094524@sss.pgh.pa.us>

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

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