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

Re: USECS_* constants undefined with float8 timestamps?

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: "Johann 'Myrkraverk' Oskarsson" <johann(at)2ndquadrant(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: USECS_* constants undefined with float8 timestamps?
Date: 2011-07-29 23:14:35
Message-ID: CA+TgmoaFVJi-Zyh5sDOPLhOaH_iixWEzTFyfgai_r7vXEsusRA@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Fri, Jul 29, 2011 at 11:18 AM, Johann 'Myrkraverk' Oskarsson
<johann(at)2ndquadrant(dot)com> wrote:
> Hi all,
>
> I just noticed that the USECS_* constants are not defined when the server
> is compiled without integer dates and timestamps.
>
> Explicitly, timestamp.h is
>
> #ifdef HAVE_INT64_TIMESTAMP
> #define USECS_PER_DAY   INT64CONST(86400000000)
> #define USECS_PER_HOUR  INT64CONST(3600000000)
> #define USECS_PER_MINUTE INT64CONST(60000000)
> #define USECS_PER_SEC   INT64CONST(1000000)
> #endif
>
> Is there a particular reason for this?  Even with float8 timestamps
> there are uses for these constants in extensions.

I don't see any particular reason not define them unconditionally.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

pgsql-hackers by date

Next:From: Joshua BerkusDate: 2011-07-29 23:58:35
Subject: RC1 / Beta4?
Previous:From: Robert HaasDate: 2011-07-29 22:36:07
Subject: Re: pgbench internal contention

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