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