inet/cidr ipv6 operations

Поиск
Список
Период
Сортировка
От George Shuklin
Тема inet/cidr ipv6 operations
Дата
Msg-id 5107A5B4.5080902@gmail.com
обсуждение исходный текст
Ответы Re: inet/cidr ipv6 operations  (Chris Angelico <rosuav@gmail.com>)
Список pgsql-general
Good day.

We trying to implement IPv6 address space management with postgres
support, but I found few strange problems.

One of them - problems with math. In IPv4 we can be sure, that
inet'0.0.0.1' + N allows to get any address you want, because N < 2^64,
and IPv4 is just 32-bit size.

But IPv6 is differ. Let's assume we wants to get 'next' /64 range.
Current range is inet'2a00:ab00:0:1/64'. We want next.

Postgres do not allow adding inet + inet, so we need to add natural
number. But 'next' /64 is 'just' 2^64. And postgres rejecting that
operations because N is too large. ... And under some conditions we can
use even /56 or /48 - which is really large numbers.

If postgres allows to do something like that: inet'2a00:ab00:0:1/64' +
inet'0:0:0:1/64' it should make life much easy.

Or may be I miss something?

Thanks.



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

Предыдущее
От: Hari Babu
Дата:
Сообщение: JDBC connection test with SSL on PG 9.2.1 server
Следующее
От: Bartosz Dmytrak
Дата:
Сообщение: Fwd: Functions not visible in pg_stat_user_functions view