Re: Why so few built-in range types? - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: Why so few built-in range types?
Date
Msg-id 20111130205829.GE24234@tamriel.snowman.net
Whole thread Raw
In response to Re: Why so few built-in range types?  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Why so few built-in range types?
List pgsql-hackers
* Robert Haas (robertmhaas@gmail.com) wrote:
> A CIDR address defines a range all by itself, without packing any
> other type on top.  It just needs GIST support, and an indexable
> operator for "contains or is contained by"; then, you can define an
> exclusion constraint over a CIDR column to enforce a
> no-duplicate-or-overlapping-IP-ranges rule.  I started working on that
> at one point, but I didn't have as much enthusiasm as the task needed
> so I gave up before accomplishing anything particularly useful.

Erm, isn't there a contrib type that already does all that for you..?
ip4r or whatever?  Just saying, if you're looking for that capability..

I do think it'd be kind of interesting to offer both that and a
straight-up 'ip_address' type w/ range types..
Thanks,
    Stephen

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: WIP: cross column stats revisited ...
Next
From: Robert Haas
Date:
Subject: Re: Why so few built-in range types?