| From: | Bruce Momjian <bruce(at)momjian(dot)us> |
|---|---|
| To: | Francisco Reyes <lists(at)stringsutils(dot)com> |
| Cc: | PostgreSQL general <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: Using Epoch to save timestamps in 4 bytes? |
| Date: | 2008-05-09 04:00:51 |
| Message-ID: | 200805090400.m4940pY21053@momjian.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Francisco Reyes wrote:
> 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.
Our timestamp has a much larger range than a 4-byte time_t, docs say:
<entry>4713 BC</entry>
<entry>294276 AD</entry>
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Scott Marlowe | 2008-05-09 07:15:57 | Re: Using Epoch to save timestamps in 4 bytes? |
| Previous Message | Francisco Reyes | 2008-05-09 03:57:47 | Using Epoch to save timestamps in 4 bytes? |