Re: pgsql: Add time/date macros for code clarity:

From: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Add time/date macros for code clarity:
Date: 2005-07-23 15:36:04
Message-ID: 20050723123542.H36717@ganymede.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Thu, 21 Jul 2005, Bruce Momjian wrote:

> Tom Lane wrote:
>> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
>>> Tom Lane wrote:
>>>> In short, I don't think this is an improvement.
>>
>>> The problem is that 24 or 30 or 60 doesn't really say what it is, while
>>> the macros are self-documenting.
>>
>> Except that they're NOT.
>>
>> Anyone who is reading datetime code will be entirely familiar with the
>> Gregorian calendar (and if they aren't, the macro names you propose are
>> not going to help them). You cannot honestly sit there and say that
>> "365" or "24" isn't going to convey anything to anyone who could
>> usefully read the code in the first place.
>>
>>> What we can do is to rename them to AVG_* macros so it is clear it is
>>> approximate.
>>
>> But still not clear which approximation is being used. And in most
>> places where this might be used, that matters.
>
> Well, if you want to see the approximation, look at the macro value. At
> least with AVG we are documenting it is an approximation, and are doing
> it consistently.

Make it APPROX_ vs AVG_ then ...

----
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: scrappy(at)hub(dot)org Yahoo!: yscrappy ICQ: 7615664

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message User Dpage 2005-07-23 19:05:03 pginstaller - pginst: Start tweaking things for 8.1
Previous Message Bruce Momjian 2005-07-23 15:31:16 pgsql: Remove unintended code addition.