Re: Range Types, discrete and/or continuous

From: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Range Types, discrete and/or continuous
Date: 2010-10-31 20:42:34
Message-ID: m2wroy856t.fsf@2ndQuadrant.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jeff Davis <pgsql(at)j-davis(dot)com> writes:
> Also, there's a good case for continuous ranges for types like NUMERIC,
> but still continuous ranges don't seem quite as important overall.

Well it seems to me that the prefix_range type is continuous, so I would
tend to disagree here :)

A prefix_range is currently written as e.g. '012[3-5]' but could be
worked out to be represented '0123-0125'. In any case here are some
example of values that are contained in the mentioned range:

0123
0124
012345
0123456789
0125221956

You get the idea, I suppose. The main use case is telephony routing:
searching for a prefix in your operator table when you know the phone
number that's calling you.

So let's not forget about continuous ranges, because there's at least
one real-world case that needs them. Oh and it's based on text really,
not on numbers, so that could be the range 'abc-abe'.

I'm too tired to try to understand how your proposal fits with what
would be needed to cover prefix ranges tonight, but I wanted to share
the use case at least.

Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dimitri Fontaine 2010-10-31 21:12:12 Re: Simplifying replication
Previous Message Alex Hunsaker 2010-10-31 20:40:49 Re: why does plperl cache functions using just a bool for is_trigger