Re: Range types - Mailing list pgsql-hackers

From Christophe Pettus
Subject Re: Range types
Date
Msg-id 53DC35FA-24E2-4997-A81C-1EA1F163F689@thebuild.com
Whole thread Raw
In response to Re: Range types  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: Range types  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-hackers
On Dec 15, 2009, at 3:40 PM, Jeff Davis wrote:

> Based on the premise that timestamps are a continuous value and the
> granularity/precision is entirely an implementation detail, you're
> right. But I disagree with the premise, at least in some cases that I
> think are worthwhile.

The argument is, in essence:
DECIMAL is continuous.DECIMAL(10,3) is discrete.

timestamptz in general is a continuous value (unless we're talking  
Planck times :) ).  There is no way for us to guarantee that  
next(timestamptz) will have the same value across all platforms; its  
epsilon is platform dependent.

However, if we specify a scale on timestamptz, it becomes much more  
useful.  Just making up a syntax, if we had timestamptz(milliseconds),  
then it's discrete and we know what next(timestamptz(milliseconds)) is.

But in the current implementation, the only way I can see making that  
work is if we specify a scale for timestamptz, and that strikes me as  
a big change to its semantics.

--
-- Christophe Pettus   xof@thebuild.com



pgsql-hackers by date:

Previous
From: decibel
Date:
Subject: Re: Range types
Next
From: Takahiro Itagaki
Date:
Subject: Re: New VACUUM FULL