Re: A question on using CIDR datatype for both ipv6 and ipv4 address

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: A question on using CIDR datatype for both ipv6 and ipv4 address
Дата
Msg-id 9134.1311897481@sss.pgh.pa.us
обсуждение исходный текст
Ответ на A question on using CIDR datatype for both ipv6 and ipv4 address  (Dhaval Shah <dhaval.shah.m@gmail.com>)
Список pgsql-admin
Dhaval Shah <dhaval.shah.m@gmail.com> writes:
> Let me know why I am not getting similar results when the RHS is an
> IPV4 in IPV6 format vs, the RHS in IPV4 format.

AFAIR, the inet/cidr types consider IPv4 to be an independent set of
values that sort in front of all IPv6 values.  The notion that IPv4
might be embedded in some part of the IPv6 space is not something that
that code is aware of.  If it did try to do that, you'd have
'::ffff:192.0.2.124' comparing as equal to '192.0.2.124', which would
be okay for some purposes but not all.

            regards, tom lane

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

Предыдущее
От: Dhaval Shah
Дата:
Сообщение: A question on using CIDR datatype for both ipv6 and ipv4 address
Следующее
От: Rohan Kadam
Дата:
Сообщение: Regarding Postgres Upgrade