Re: Adding integers ( > 8 bytes) to an inet

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Adding integers ( > 8 bytes) to an inet
Дата
Msg-id 26970.1252424222@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Adding integers ( > 8 bytes) to an inet  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: Adding integers ( > 8 bytes) to an inet  (Kristian Larsson <kristian@spritelink.net>)
Список pgsql-general
Alvaro Herrera <alvherre@commandprompt.com> writes:
> I'd say this is just a missing feature.

I think the whole thing is a bit of a crock; adding integers to inet
addresses doesn't make a lot of sense logically.  Perhaps what is
really wanted is functions on CIDR net identifiers, for instance

    first_address('10/8') = 10.0.0.0
    last_address('10/8') = 10.255.255.255
    prior_address('10/8') = 9.255.255.255
    next_address('10/8') = 11.0.0.0

which would have obvious extensions to IPv6 without having to bring
numerics into the picture.

What are the actual applications for adding integers to inet addresses?
The one Kristian mentions seems to be covered by next_address(), but
are there others?

            regards, tom lane

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

Предыдущее
От: Sam Mason
Дата:
Сообщение: Re: How to store data on an external drive
Следующее
От: Kristian Larsson
Дата:
Сообщение: Re: Adding integers ( > 8 bytes) to an inet