Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql General > Re: Using Epoch...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 6 of 7 Topic 15492 of 17437
Post > Topic >>

Re: Using Epoch to save timestamps in 4 bytes?

by mmoncure@[EMAIL PROTECTED] ("Merlin Moncure") May 9, 2008 at 08:51 AM

On Fri, May 9, 2008 at 3:15 AM, Scott Marlowe <scott.marlowe@[EMAIL PROTECTED]
>
wrote:
> On Thu, May 8, 2008 at 10:00 PM, Bruce Momjian <bruce@[EMAIL PROTECTED]
> wrote:
>>
>>  Our timestamp has a much larger range than a 4-byte time_t, docs say:
>>
>>         <entry>4713 BC</entry>
>>         <entry>294276 AD</entry>
>
> Which is normally great.  Doesn't it have greater precision in the
> modern era or something like that?
>
> If you compile for integer dates do they have the same range?

no. that's actually the integer range.  the float range is 4713 BC to
5874897 AD.   Of course, at the outer ranges of the scale, the
precision is going to be really lousy.

Anyways, to the OP, a 4 byte time_t is to small a type to be the
timestamp.  There are just too many things that need greater
range/precision to make it the default.  Also, postgresql does not
store epoch, but it's own custom type with its own bias, etc.  There
is nothing wrong with storing int4 epoch in your tables to save a
little space if that suits your application.

merlin

-- 
Sent via pgsql-general mailing list (pgsql-general@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
 




 7 Posts in Topic:
Using Epoch to save timestamps in 4 bytes?
lists@[EMAIL PROTECTED]   2008-05-08 23:57:47 
Re: Using Epoch to save timestamps in 4 bytes?
bruce@[EMAIL PROTECTED]   2008-05-09 00:00:51 
Re: Using Epoch to save timestamps in 4 bytes?
lists@[EMAIL PROTECTED]   2008-05-10 20:47:11 
Re: Using Epoch to save timestamps in 4 bytes?
tgl@[EMAIL PROTECTED] (T  2008-05-10 21:37:29 
Re: Using Epoch to save timestamps in 4 bytes?
scott.marlowe@[EMAIL PROT  2008-05-09 01:15:57 
Re: Using Epoch to save timestamps in 4 bytes?
mmoncure@[EMAIL PROTECTED  2008-05-09 08:51:26 
Re: Using Epoch to save timestamps in 4 bytes?
tgl@[EMAIL PROTECTED] (T  2008-05-09 10:02:59 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 12:22:14 CST 2008.