Re: Imprecision of DAYS_PER_MONTH

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Imprecision of DAYS_PER_MONTH
Дата
Msg-id 19093.1121955582@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Imprecision of DAYS_PER_MONTH  (Bruno Wolff III <bruno@wolff.to>)
Список pgsql-hackers
Bruno Wolff III <bruno@wolff.to> writes:
> On Thu, Jul 21, 2005 at 09:39:38 -0400,
>   Bruce Momjian <pgman@candle.pha.pa.us> wrote:
>> Let me add that we could actually do this in many places now because we
>> are already converting to 'time' in those places.  Is this a TODO?

> Shouldn't you be using 365.2425/12 (30.436875) for the number of days per
> month?

This sort of question is exactly why the entire change was a bad idea.
No one will ever read any of those macros without stopping to look at
the macro definition, which makes them a net readability loss, not gain.
        regards, tom lane


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

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: Imprecision of DAYS_PER_MONTH
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Imprecision of DAYS_PER_MONTH