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

From: Jack Douglas <jack(at)douglastechnology(dot)co(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: "interval hour to minute" or "interval day to minute"
Date: 2011-04-17 15:55:51
Message-ID: 4DAB0D87.8070500@douglastechnology.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2011-04-17 16:00:39 Re: Using column aliasses in the same query
Previous Message Robert J.C. Ivens 2011-04-17 12:06:02 Re: Using column aliasses in the same query