Using Epoch to save timestamps in 4 bytes?

From: Francisco Reyes <lists(at)stringsutils(dot)com>
To: PostgreSQL general <pgsql-general(at)postgresql(dot)org>
Subject: Using Epoch to save timestamps in 4 bytes?
Date: 2008-05-09 03:57:47
Message-ID: cone.1210305467.346740.51351.1000@zoraida.natserv.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

While looking at a database I inheritted I noticed the database has tables
with integers used to store epoch.

I noticed that timestamp is 8 bytes and was wondering how come timestamp is
8 bytes and not 4. Is it to be able to support precission beyond a second?

I am looking at tens of millions of rows, which is why my predecessor may
have used integer to store epoch to save space.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2008-05-09 04:00:51 Re: Using Epoch to save timestamps in 4 bytes?
Previous Message Bruce Momjian 2008-05-09 03:29:42 Re: Fragments in tsearch2 headline