Re: Range types

From: Dimitri Fontaine <dfontaine(at)hi-media(dot)com>
To: Scott Bailey <artacus(at)comcast(dot)net>
Cc: hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Range types
Date: 2009-12-14 13:01:05
Message-ID: 87fx7d7lri.fsf@hi-media-techno.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Scott Bailey <artacus(at)comcast(dot)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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Boszormenyi Zoltan 2009-12-14 13:11:40 Re: ECPG patch 3, DESCRIBE [OUTPUT] support
Previous Message Magnus Hagander 2009-12-14 12:56:27 Re: Hot Standby, release candidate?