Re: Which is best, timestamp as float or integer ?

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-general(at)postgresql(dot)org
Cc: A B <gentosaker(at)gmail(dot)com>
Subject: Re: Which is best, timestamp as float or integer ?
Date: 2009-02-04 21:27:19
Message-ID: 200902042327.20477.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wednesday 04 February 2009 15:48:41 A B wrote:
> From the manual I read that timestamps are stored as double but they
> can also be stored as 8 byte integers.

The advantage of the integer storage is mainly that calculations and
comparisons have a predictable error and don't suffer from some of the funny
business that comes with floating-point calculations. Performance is
probably similar. Integer storage is now the default (and has been in some
distributions for a while), and would already have been the sole world order
if 8-byte integer support were universally available.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Nico Callewaert 2009-02-04 21:59:17 Elapsed time between timestamp variables in Function
Previous Message Peter Eisentraut 2009-02-04 21:20:42 Re: Pet Peeves?