"interval hour to minute" or "interval day to minute" - Mailing list pgsql-general

From Jack Douglas
Subject "interval hour to minute" or "interval day to minute"
Date
Msg-id 4DAB0D87.8070500@douglastechnology.co.uk
Whole thread Raw
Responses Re: "interval hour to minute" or "interval day to minute"
List 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 by date:

Previous
From: Radosław Smogura
Date:
Subject: Re: Howto sort the result of UNION (without modifying its type)?
Next
From: Craig Ringer
Date:
Subject: Re: How to configure a read-only database server and session? (Was: read-only UNLOGGED tables)