"interval hour to minute" or "interval day to minute"

Поиск
Список
Период
Сортировка
От Jack Douglas
Тема "interval hour to minute" or "interval day to minute"
Дата
Msg-id 4DAB0D87.8070500@douglastechnology.co.uk
обсуждение исходный текст
Ответы Re: "interval hour to minute" or "interval day to minute"
Список pgsql-general
Hi

I discovered the 'fields' option of 'interval', but i can't figure out
from the docs how it is supposed to work. Are "hour to minute" and "day
to minute" really the same thing? And if not, in what circumstances are
they treated differently?

psql (8.4.7)
Type "help" for help.

postgres=> select '3 years 2 months - 1 day + 10 hours 5
minutes'::interval day to minute;
              interval
----------------------------------
  3 years 2 mons -1 days +10:05:00
(1 row)

postgres=> select '3 years 2 months - 1 day + 10 hours 5
minutes'::interval hour to minute;
              interval
----------------------------------
  3 years 2 mons -1 days +10:05:00
(1 row)

Warm regards
Jack Douglas

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