Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Using Epoch to save timestamps in 4 bytes?



Bruce Momjian writes:

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>

Given that all of our dates will fall within what we can store in 4bytes, what would be the easiest way to use epoch as a timestamp?

Create a couple of functions so our developers can use a date representation like '20080508 12:40:00' and have the functions tranlate strings to epoch and back?



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group