Widening time_t to 8 bytes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Widening time_t to 8 bytes
Date: 2004-05-21 21:36:10
Message-ID: 16264.1085175370@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Now that we have control of our own timezone code, one of the first
things I'd like to do with it is replace time_t with pg_time_t defined
as (signed) int8. This would allow us to handle timezone calculations
outside the 1904-2038 range, and in particular eliminate the bizarre
behaviors that currently exist for timestamps near either of those
boundaries.

On compilers that don't have an int8 type available, the behavior would
be the same as now. That's an ever-smaller proportion of platforms
though.

The only downside I can see is that our zic files would be incompatible
with everyone else's. However, it's a dead certainty that everyone else
will have to go to 8-byte values in zic files sooner or later, so
they'll catch up with us eventually.

Any objections?

regards, tom lane

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2004-05-21 21:53:28 Re: Delaying the planning of unnamed statements until Bind
Previous Message Vivek Khera 2004-05-21 20:49:55 Re: pg_autovacuum seems to be a neat freak and cleans way too much