Re: Range types

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: Range types
Дата
Msg-id 1260925533.13414.2262.camel@monkey-cat.sm.truviso.com
обсуждение исходный текст
Ответ на Re: Range types  (Christophe Pettus <xof@thebuild.com>)
Список pgsql-hackers
On Tue, 2009-12-15 at 16:08 -0800, Christophe Pettus wrote:
> 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.

Not unless you compile with float timestamps. Integer timestamps are
microseconds since the year 2000 (positive or negative), which is
platform-independent.

I'm not arguing that we shouldn't support continuous time at all
(clearly, enough people in this thread seem to like it), but I do want
discrete time ranges. A lot of the temporal database literature is
written assuming discrete time intervals.

> 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.

It's already useful at the microsecond precision level. Also, the
granule could be defined for the range type (as Scott suggested) rather
than the timestamp itself.

Regards,Jeff Davis



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: Range types
Следующее
От: "Florian G. Pflug"
Дата:
Сообщение: Re: Compiling HEAD with -Werror int 64-bit mode