Skip site navigation (1) Skip section navigation (2)

question about timestamp

From: "Warren Turkal" <wturkal(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: question about timestamp
Date: 2007-12-30 08:40:23
Message-ID: 7fdf8c4d0712300040v6f237802p31c91c14fb4dabe@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Is there a reason that the value of the HAVE_INT64_TIMESTAMP macro is
used to choose a datatype in datetime.c instead of having a typedef
defined?

I would like to write a patch to change constructs like the following:

#ifdef HAVE_INT64_TIMESTAMP
    int64       span1,
                span2;
#else
    double      span1,
                span2;
#endif

to something like the following:

    timestamp_t span1, span2;

where timestamp_t is in some header (likely utils/datetime.h) like:

Is there a reason that the value of the HAVE_INT64_TIMESTAMP macro is
used to choose a datatype in datetime.c instead of having a typedef
defined?

I would like to write a patch to change constructs like the following:

#ifdef HAVE_INT64_TIMESTAMP
    typedef int64 timestamp_t;
#else
    typedef double timestamp_t,
#endif


Is this a patch like that would be welcome?

Thanks,
wt

pgsql-hackers by date

Next:From: kenneth d'souzaDate: 2008-01-01 13:02:42
Subject: concurrency in psql
Previous:From: Bruce MomjianDate: 2007-12-30 00:43:21
Subject: Re: Spoofing as the postmaster

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group