pgsql: Fix interval division and multiplication, before: test=> select

Поиск
Список
Период
Сортировка
От momjian@svr1.postgresql.org (Bruce Momjian)
Тема pgsql: Fix interval division and multiplication, before: test=> select
Дата
Msg-id 20050720035024.EF82452849@svr1.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
Fix interval division and multiplication, before:

    test=> select '4 months'::interval / 5;
       ?column?
    ---------------
     1 mon -6 days
    (1 row)

after:

    test=> select '4 months'::interval / 5;
     ?column?
    ----------
     24 days
    (1 row)

The problem was the use of rint() to round, and then find the remainder,
causing the negative values.

Modified Files:
--------------
    pgsql/src/backend/utils/adt:
        timestamp.c (r1.132 -> r1.133)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/timestamp.c.diff?r1=1.132&r2=1.133)

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

Предыдущее
От: jzhang@pgfoundry.org (User Jzhang)
Дата:
Сообщение: bizgres - bizgres: Check in the code for the bitmap scan.
Следующее
От: momjian@svr1.postgresql.org (Bruce Momjian)
Дата:
Сообщение: pgsql: Add 'day' field to INTERVAL so 1 day interval can be