Re: Why so few built-in range types?

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Why so few built-in range types?
Дата
Msg-id CA+TgmoYY-dy8LPp+Y_T2GxyuDh7k35BzqwD9jdo+jhaOi+R+Ow@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Why so few built-in range types?  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: Why so few built-in range types?  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-hackers
On Wed, Nov 30, 2011 at 1:08 PM, Jeff Davis <pgsql@j-davis.com> wrote:
> One that I'd like to see is an IP address type, but that's complicated
> because inet and cidr support netmasks.

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.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: review: CHECK FUNCTION statement
Следующее
От: Tom Lane
Дата:
Сообщение: Re: review: CHECK FUNCTION statement