PG Bug reporting form <noreply@postgresql.org> writes: > CREATE TEMP TABLE decimal_source (raw_value text NOT NULL); > INSERT INTO decimal_source VALUES > ('1.0'), ('1.00'), ('1.000'); > SELECT amount, partition_size > FROM ( > SELECT raw_value::numeric AS amount, > COUNT(*) OVER (PARTITION BY raw_value::numeric) AS partition_size > FROM decimal_source > ) AS windowed > WHERE scale(amount) = 1; This is a near-duplicate of many recent reports[1][2][3][4][5]. Not one of them has offered a reason why they think that testing scale() of a grouped numeric column is a useful or even well-defined thing to do. Do you have a real-world use case? What is it? regards, tom lane [1] https://www.postgresql.org/message-id/flat/CA%2BCOZaA0tnyza0pHx6-UEdM5dcLGP4RJJ0KOHFq%2BwVQCY2Jyiw%40mail.gmail.com [2] https://www.postgresql.org/message-id/flat/19588-e32b82433b3660ea%40postgresql.org [3] https://www.postgresql.org/message-id/flat/19619-fc646db1c6b2dc90%40postgresql.org [4] https://www.postgresql.org/message-id/flat/19697-6e7ccba388bbe858%40postgresql.org [5] https://www.postgresql.org/message-id/flat/19713-635b8656d07464df%40postgresql.org
pgsql-bugs by date:
Соглашаюсь с условиями обработки персональных данных