Configuring for 64-bit integer date/time storage?

From: Thomas Lockhart <thomas(at)fourpalms(dot)org>
To: PostgreSQL Hackers List <pgsql-hackers(at)postgresql(dot)org>
Subject: Configuring for 64-bit integer date/time storage?
Date: 2002-03-24 17:58:39
Message-ID: 3C9E13CF.222D333A@fourpalms.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I've got patches to enable storage of date/time values as integers
rather than as floating point numbers, as discussed earlier. 64-bit
integers are (afaik) not available on every platform we want to support,
and there *may* be a performance difference depending on the processor
and compiler involved (I haven't run focused timing tests yet), so we
will want the original floating point implementation to continue to be
available.

For development, I've just defined HAVE_INT64_TIMESTAMP (probably should
become HAVE_INT64_DATETIMES or something like that?) in my
Makefile.custom, but of course this should become some combination of
command-line option and perhaps a consistancy check in the configuration
process. afaict configure.in and pg_config.h.in are the interesting
files for this.

I've got questions:

1) For the ./configure command line option, does
--enable-integer-datetimes seem OK, or could someone suggest a better
choice? --enable-integer-datetimes is a longer string than any of the
other options, so a less wordy possibility may be better.

2) Actually using integer date/time storage depends on whether 64-bit
integers are really supported. So although they may be enabled, it may
not be supported. Should ./configure error out at that point, or should
things gracefully (silently?) configure to use the existing floating
point implementation? See (3).

3) ./configure checks for several different styles of 64-bit integers to
see what is actually supported. But it does not control whether an
overall "yes we have some kind of 64-bit integer" flag gets defined. So
detecting an inconsistancy in enabling 64-bit integer storage on
machines without 64-bit integers seems to be out of the scope of
./configure. Correct?

I could keep asking variations on these same questions, so feel free to
add answers to questions which weren't asked ;)

- Thomas

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-03-24 18:09:38 Re: Configuring for 64-bit integer date/time storage?
Previous Message Thomas Lockhart 2002-03-24 07:13:07 Re: patch for include/utils/datetime.h to target NetWare