Q: inet operators for IPv4 encapsulated in IPv6

Поиск
Список
Период
Сортировка
От Albrecht Dreß
Тема Q: inet operators for IPv4 encapsulated in IPv6
Дата
Msg-id SXMXUDTK.3SCF2S3E.4WL2Z437@M4LKTL7F.IEVOZHH2.TS4HJ37P
обсуждение исходный текст
Ответы Re: Q: inet operators for IPv4 encapsulated in IPv6
Список pgsql-general
I have a question regarding the use of inet operators in environments with mixed IPv4 and IPv6 notations.

Consider the example from sect. 9.12. “Network Address Functions and Operators” in the docs which returns properly

<snip>
postgres=# select '192.168.1.5'::inet << '192.168.1/24'::inet;
  ?column?
----------
  t
(1 row)
</snip>

However, for an IPv6 encapsulated IPv4 address, the result is

<snip>
postgres=# select '::ffff:192.168.1.5'::inet << '192.168.1/24'::inet;
  ?column?
----------
  f
(1 row)
</snip>

Although the representation is different, in reality '192.168.1.5' and '::ffff:192.168.1.5' designate the same node, so
IMHOit would be logical if the second statement would also return True.  Is there any option to simply achieve this?  I
usePostgreSQL v. 15 on a Debian Bookworm box. 

Thanks in advance, Albrecht.
Вложения

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

Предыдущее
От: Erik Wienhold
Дата:
Сообщение: Re: postgreSQL UPPER Method is converting the character "µ" into "M"
Следующее
От: Helmut Bender
Дата:
Сообщение: Re: postgreSQL UPPER Method is converting the character "µ" into "M"