Re: Range Types, discrete and/or continuous

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Range Types, discrete and/or continuous
Дата
Msg-id AANLkTika4sfgdt-XSzvOtUDsKhL61AdNPBa5tSt=dt7S@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Range Types, discrete and/or continuous  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: Range Types, discrete and/or continuous  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-hackers
On Mon, Oct 25, 2010 at 2:27 PM, Jeff Davis <pgsql@j-davis.com> wrote:
> On Mon, 2010-10-25 at 13:00 -0400, Robert Haas wrote:
>> I'm still confused.  It seems to me (and maybe I'm full of it) that
>> the distinction between continuous ranges and discrete ranges is
>> pretty minor.  Suppose you have continuous ranges done, and working.
>> The only thing you need to add for discrete ranges (I think) is a
>> canonicalization function that converts a range with one or both ends
>> open to a range with both ends closed.  Then you just apply this
>> canonicalization functions to every value supplied by the user before
>> doing anything else with it.  Poof, discrete ranges!  What am I
>> missing?
>
> That's not too far from what I'm suggesting. On the wiki page, under
> "approach 2" you'll see that one of the functions needed is a
> "constructor" which would put it into a canonical form (if applicable)
> and construct the representation.
>
> I think the difference is that I assumed that the UDFs used for the type
> definition would handle both canonicalization and representation. I
> think what you're suggesting is that postgres could handle
> representation, and just always call the UDF to put it in canonical form
> first. That might make it easier to define new types, but might limit
> any representation optimizations that certain range types may be able to
> exploit. Either approach seems reasonable to me.

<reads wiki page>

Hmm.  Do you have some concrete examples of cases where a range type
might want to do some representational optimization?

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


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Floating-point timestamps versus Range Types
Следующее
От: Anders Steinlein
Дата:
Сообщение: Bug: citext not working in non-public schema