Re: Range types - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: Range types
Date
Msg-id 20091214133941.GA10663@svana.org
Whole thread Raw
In response to Range types  (Scott Bailey <artacus@comcast.net>)
Responses Re: Range types  (Scott Bailey <artacus@comcast.net>)
List pgsql-hackers
On Sun, Dec 13, 2009 at 11:49:53PM -0800, Scott Bailey wrote:
> So basically I have an anyrange pseudo type with the functions prev,
> next, last, etc defined. So instead of hard coding range types, we would
> allow the user to define their own range types. Basically if we are able
> to determine the previous and next values of the base types we'd be able
> to define a range type. I'm envisioning in a manner much like defining
> an enum type.

I find it odd that you could define functions next() and prev() since
that assumes some kind of dicretisation which simply does not exist for
most types I can think of.

It would seem to me the real useful uses of ranges would be the
operations overlaps, disjoint, proceeds, follows, etc, which could all
be defined on any well-ordered type (wherever greater-than and
less-than are well defined). No need to discretise anything.

Do you have any actual usecase for a distretized range type for
timestamp?

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

pgsql-hackers by date:

Previous
From: Boszormenyi Zoltan
Date:
Subject: Re: ECPG patch 3, DESCRIBE [OUTPUT] support
Next
From: Fujii Masao
Date:
Subject: Re: Streaming replication and non-blocking I/O