Re: WIP: Range Types

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: WIP: Range Types
Дата
Msg-id AANLkTikW+E=Etk+izaXqBSLa4zMh1wSZcj5i1d_c91Sn@mail.gmail.com
обсуждение исходный текст
Ответ на WIP: Range Types  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: WIP: Range Types  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-hackers
On Tue, Jan 4, 2011 at 2:29 AM, Jeff Davis <pgsql@j-davis.com> wrote:
> I liked Robert's suggestion here:
>
> http://archives.postgresql.org/message-id/AANLkTiks_x93_k82b4f_ga634wCi0oeb9fTrUrF28EGM@mail.gmail.com
>
> which says that the user can just define a "canonicalize" function that
> will take a range as input (or perhaps the logical pieces of a range)
> and put it into an appropriate canonical representation. For instance,
> int4range_canonical might take (1,4] and turn it into [2,4]. This is
> similar to a few other ideas, but Robert's idea seems to require the
> least effort by the person defining the range type, because postgresql
> can still handle representation.
>
> It doesn't allow for all of the suggested features. In particular, it
> would not allow "granules" to be specified for discrete ranges. But on
> balance, it seems like this is the most conceptually simple and I think
> it satisfies the primary use cases.

Maybe I'm missing something, but it seems like this approach could
support granules.  You just have to define the canonicalize function
in terms of the granule.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: Re: new patch of MERGE (merge_204) & a question about duplicated ctid
Следующее
От: "David E. Wheeler"
Дата:
Сообщение: Re: Upgrading Extension, version numbers