Re: Macros for time magic values - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Macros for time magic values
Date
Msg-id 201103111809.p2BI9mY10089@momjian.us
Whole thread Raw
In response to Re: Macros for time magic values  (Christopher Browne <cbbrowne@gmail.com>)
Responses Re: Macros for time magic values
List pgsql-hackers
Christopher Browne wrote:
> On Fri, Mar 11, 2011 at 12:50 PM, Bruce Momjian <bruce@momjian.us> wrote:
> > It has bothered me that many of our time routines use special magic
> > constants for time values, e.g. 24, 12, 60, etc.
> >
> > The attached patch changes these magic constants to macros to clarify
> > the code. ?I would like to apply this for 9.1 as a cleanup.
> 
> The context diffs show off some references to 1901 and 2038...
> 
> Here's a *possible* extension to this...


Interesting idea, but UTIME_MINYEAR/UTIME_MAXYEAR is only defined in
src/interfaces/ecpg/pgtypeslib/dt.h, and it seems odd to duplicate or
move them for just one use site.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + It's impossible for everything to be true. +


pgsql-hackers by date:

Previous
From: Christopher Browne
Date:
Subject: Re: Macros for time magic values
Next
From: Robert Haas
Date:
Subject: Re: How should the waiting backends behave in sync rep?