Re: Imprecision of DAYS_PER_MONTH - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Imprecision of DAYS_PER_MONTH
Date
Msg-id 19093.1121955582@sss.pgh.pa.us
Whole thread Raw
In response to Re: Imprecision of DAYS_PER_MONTH  (Bruno Wolff III <bruno@wolff.to>)
List 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 by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Imprecision of DAYS_PER_MONTH
Next
From: Tom Lane
Date:
Subject: Re: Imprecision of DAYS_PER_MONTH