bizarre AGE behaviour

Поиск
Список
Период
Сортировка
От DHS Webmaster
Тема bizarre AGE behaviour
Дата
Msg-id 40461395.5324CFEE@dhs-club.com
обсуждение исходный текст
Ответы Re: bizarre AGE behaviour  (Steve Crawford <scrawford@pinpointresearch.com>)
Список pgsql-admin
Hello all,
Many thanks for this fine product.
We began encountering some unexpected date related errors this week and
after further investigation found the following. We use the postgres AGE
function in a custom function. The AGE function has begun to throw some
unanticipated results back. This has not happened before and my first
guess is that it may be leap year related. Here are some examples.

This is good...
network=# select age('04-01-04','03-01-04');
  age
-------
 1 mon
(1 row)

This isn't...
network=# select age('05-01-04','03-01-04');
         age
---------------------
 1 mon 30 days 23:00
(1 row)

Now it gets really strange......
network=# select age('06-01-04','04-01-04');
         age
---------------------
 1 mon 29 days 23:00
(1 row)

This may have been addressed in the past (I subscribe to this list) and
I just missed it, but is there a simple fix for this problem?
Thanks.
--
Bill MacArthur
Webmaster
The DHS Club, Inc.
The Best Is Yet To Come!

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: un-CLUSTER?
Следующее
От: Steve Crawford
Дата:
Сообщение: Re: bizarre AGE behaviour