Re: timestamp datatype cleanup

From: "Warren Turkal" <turkal(at)google(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: timestamp datatype cleanup
Date: 2008-03-21 01:44:43
Message-ID: 8c3d85470803201844scc7f96cmc7c8d03067b0ce38@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Mar 20, 2008 at 5:22 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Warren Turkal <turkal(at)google(dot)com> writes:
>
> > Here's an initial bit of my attempt at cleaning up the the timestamp datatype.
>
> I'm starting to work through this now. Your two messages of 3/09 are
> still the latest version correct?

Yes, I can rebase it if neccessary.

> > 2) Would it be reasonable to change timestamp.h into a file that
> > includes other files that define the specific parts depending on
> > HAVE_INT64_TIMESTAMP instead of testing for HAVE_INT64_TIMESTAMP many
> > times throughout timestamp.h? I think this might more cleanly separate
> > the logic for the different timestamp types.
>
> I think this is probably a bad idea on maintainability grounds. First,
> you'd be duplicating the declarations that are the same, which would
> leave you open to changing one copy and not the other. Second, having
> both versions of any given declaration adjacent to each other makes it
> easier to compare them and keep them in sync. Two separate files just
> sounds like a recipe for code drift.

That was what I afraid of and why I posed the question.

I have to say, I am wondering more and more how real the need is for
the two representations of timestamps. Would it be better to deprecate
the float format or at least make the int64 format the default?

wt

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-03-21 01:48:38 Re: timestamp datatype cleanup
Previous Message Tom Lane 2008-03-21 01:41:06 Re: [PATCH] Add TimeOffset and DateOffset typedefs