Re: value returned by EXTRACT, date_part

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: value returned by EXTRACT, date_part
Дата
Msg-id 3563362.1598717072@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: value returned by EXTRACT, date_part  (John Lumby <johnlumby@hotmail.com>)
Список pgsql-sql
John Lumby <johnlumby@hotmail.com> <DM6PR06MB55625C1A9319BC921F4FB4ACA3530@DM6PR06MB5562.namprd06.prod.outlook.com>
writes:
> What is not clear to me is how the "components" (aka "subfields") of an
> interval are defined.

The spec says that year,month,day,hour,minute,second are independent
fields.  Postgres doesn't implement it quite that way: we treat the
basic fields as being months, days, and (micro)seconds, folding the
other values into those for storage.  That's why "14 months" comes out
as "1 year 2 months", for example.

            regards, tom lane



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

Предыдущее
От: John Lumby
Дата:
Сообщение: Re: value returned by EXTRACT, date_part
Следующее
От: Christophe Pettus
Дата:
Сообщение: Re: Crossing/Rotating table rows to rows and columns