Re: Range Types, discrete and/or continuous

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Range Types, discrete and/or continuous
Date: 2010-10-26 17:35:56
Message-ID: AANLkTi=z1iOmG4StOcWVav4JiEKj=4EB2uwF_EK8cTaS@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Oct 26, 2010 at 1:26 PM, Jeff Davis <pgsql(at)j-davis(dot)com> wrote:
> On Mon, 2010-10-25 at 21:07 -0400, Robert Haas wrote:
>> See, that gets complicated, because now you're restricting the range
>> of values that can be expressed by the range type to something less
>> than the natural range of the data type.  I am not sure the value of
>> supporting that is sufficient to justify the amount of extra code that
>> will be required to make it work.  I'd say for a first version, nail
>> down the representation.  Perhaps in a future version you could have
>> compress/uncompress methods sort of like GIST,
>
> OK, I can live with that.
>
>> ALTER TYPE timestamptz
>>     ADD INTERFACE increment timestamp_pl_interval(timestamptz, interval),
>>     ADD INTERFACE decrement timestamp_mi_interval(timestamptz, interval);
>
> I think we chatted about this before. Sounds like a good idea to me
> (except the name -- "increment" is not the same as "plus").
>
> However, this is orthogonal, I think. I can always ask the user to
> specify everything when creating a Range Type, and then we can make them
> default to use the interface functions later. Some, like "plus" might be
> constant, but people certainly might want to specify alternate
> comparators.

If it were me, I would go design and implement the type interface part
first. But it's not.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-10-26 17:42:32 Re: Range Types, discrete and/or continuous
Previous Message Peter Eisentraut 2010-10-26 17:27:34 Re: foreign keys for array/period contains relationships