Fixed patch for timestamp refactor effort - Mailing list pgsql-hackers

From Warren Turkal
Subject Fixed patch for timestamp refactor effort
Date
Msg-id 12010360793012-git-send-email-turkal@google.com
Whole thread Raw
Responses [PATCH] Add TimeOffset and DateOffset typedefs
List pgsql-hackers
Here is a fixed patch for the timestamp refactor. I apologize for sending the
wrong patch earlier.

I would like to get some comments on if this patch is heading in the right
direction. Here's the proposal for what I am doing:


Proposal for Refactoring of Timestamp Datatype


Goal:
The primary goal of this effort is to remove as many of the #ifdef tests for
HAVE_INT64_TIMESTAMP from timestamp.c[1] as possible. I have played with
PostgreSQL for many years and I look at this as an opportunity to give back to
the community.


Plan:
1. Replace datatypes selected by value of HAVE_INT64_TIMESTAMP with typedefs.  The typedefs will most likely be placed
intimestamp.h[2].
 
2. Replace the places where the logic is determined by the value of  HAVE_INT64_TIMESTAMP with macros or function
calls.


Further Investigation:
It may also be useful to investigate if PostgreSQL still needs two different
representations for timestamps (int64 or double).


[1]$(srcdir)/src/backend/utils/adt/timestamp.c
[2]$(srcdir)/src/include/utils/timestamp.h

Thanks,
wt


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Suboptimal plan choice problem with 8.3RC2
Next
From: Warren Turkal
Date:
Subject: [PATCH] Add TimeOffset and DateOffset typedefs