Re: Range types - Mailing list pgsql-hackers

From Dimitri Fontaine
Subject Re: Range types
Date
Msg-id 87fx7d7lri.fsf@hi-media-techno.com
Whole thread Raw
In response to Range types  (Scott Bailey <artacus@comcast.net>)
List pgsql-hackers
Scott Bailey <artacus@comcast.net> writes:

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

It's not clear how to define those functions for the prefix_range
datatype, where '123' represents any text begining with those chars and
'123[4-6]' any text begining with '123' then either 4, 5 or 6.

What's supposed to return SELECT next('123'::prefix_range); ?

Regards,
-- 
dim

PS: as I'm used to use that in the telephony context, the example
contain figures, but it's a text based type and given questions and
reports in pgsql-general, people do use it with text ranges too.


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Hot Standby, release candidate?
Next
From: Boszormenyi Zoltan
Date:
Subject: Re: ECPG patch 3, DESCRIBE [OUTPUT] support