Re: date_part returns different results with same interval.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: date_part returns different results with same interval.
Дата
Msg-id 9196.1077339194@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: date_part returns different results with same interval.  (Wade Klaver <archeron@wavefire.com>)
Список pgsql-bugs
Wade Klaver <archeron@wavefire.com> writes:
> I guess what I am trying
> to say is that the date_part() call is how you determine what you are
> asking...  If I want to get the number of years, it shouldn't matter if my
> interval is '1 year, 1 month' or '396 days', they both contain 1 year.

I think you missed the point.  If I want to get the number of months,
it's clear what the answer is for an interval of '1 year', but not at
all clear what the answer is for an interval of '60 days'.  Months and
days don't have a fixed conversion factor.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Hang in PQgetResult
Следующее
От: "PostgreSQL Bugs List"
Дата:
Сообщение: BUG #1082: Order by doesn't sort correctly.