BUG #11031: Unexpected interval representations

Поиск
Список
Период
Сортировка
От marius.bauer@here.com
Тема BUG #11031: Unexpected interval representations
Дата
Msg-id 20140724132303.32098.66956@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #11031: Unexpected interval representations  (David G Johnston <david.g.johnston@gmail.com>)
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      11031
Logged by:          Marius Bauer
Email address:      marius.bauer@here.com
PostgreSQL version: 9.3.3
Operating system:   Amazon RDS
Description:

Please see following query and result:

unitystg=> select a + b as sum, b - a as dif, 2 * a as pro, b / 2 as quo
from (select interval'1 day 15:45:25' as a, interval'2 days 12:34:56' as b)
as foo;
       sum       |       dif       |       pro       |      quo
-----------------+-----------------+-----------------+----------------
 3 days 28:20:21 | 1 day -03:10:29 | 2 days 31:30:50 | 1 day 06:17:28
(1 row)

Usually I'd expect the day will be adjusted in those cases when the hour is
>= 24 or < 0, but this does not happen.

The interval value itself is correct, just the representation is unexpected.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #11028: psql doesn't use 0x01 and 0x02 to inform readline of non-printable PROMPT1 chars
Следующее
От: David G Johnston
Дата:
Сообщение: Re: BUG #11031: Unexpected interval representations