WIDTH_BUCKET inconsistency

Поиск
Список
Период
Сортировка
От Martin Visser
Тема WIDTH_BUCKET inconsistency
Дата
Msg-id 6FA5117D-6AED-4656-8FEF-B74AC18FAD85@brytlyt.com
обсуждение исходный текст
Ответы Re: WIDTH_BUCKET inconsistency  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Inconsistent results between numeric and double precision types.

Reproduction:
CREATE TABLE tab( 
    col1 REAL,
    col2 DOUBLE PRECISION,
    col3 NUMERIC
);

INSERT into tab VALUES 
    (10, 10, 10), 
    (20, 20, 20), 
    (30, 30, 30), 
    (40, 40, 40), 
    (50, 50, 50), 
    (60, 60, 60), 
    (70, 70, 70), 
    (80, 80, 80), 
    (90, 90, 90), 
    (100, 100, 100);

SELECT col1, width_bucket(col1, 10, 100, 9), width_bucket(col2, 10, 100, 9), width_bucket(col3, 10, 100, 9) FROM tab;

 col1 | width_bucket | width_bucket | width_bucket
------+--------------+--------------+--------------
   10 |            1 |            1 |            1
   20 |            2 |            2 |            1
   30 |            3 |            3 |            2
   40 |            4 |            4 |            3
   50 |            5 |            5 |            4
   60 |            6 |            6 |            6
   70 |            7 |            7 |            7
   80 |            8 |            8 |            8
   90 |            9 |            9 |            9
  100 |           10 |           10 |           10
(10 rows)

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #16659: postgresql leaks memory or do not limit its usage
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #16661: Changing columns after the rule is created leads to an error when the RETURNING is used