BUG #17550: inet type doesn't accept alternate notations of ipv4 addresses

Поиск
Список
Период
Сортировка
От PG Bug reporting form
Тема BUG #17550: inet type doesn't accept alternate notations of ipv4 addresses
Дата
Msg-id 17550-277c0ecd43597da9@postgresql.org
обсуждение исходный текст
Ответы Re: BUG #17550: inet type doesn't accept alternate notations of ipv4 addresses
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      17550
Logged by:          Doeke Zanstra
Email address:      doekman@icloud.com
PostgreSQL version: 13.7
Operating system:   MacOS Monterey
Description:

When I use the following strings as value for inet-type fields, I get the
error "ERROR:  invalid input syntax for type inet" for the first three
insert statements.

    create table e (id serial primary key, ip_addr inet not null);
    insert into e(ip_addr) values ('127.1'); -- short syntax for 127.0.0.1
    insert into e(ip_addr) values ('3232281089'); -- integer version of
192.168.178.1
    insert into e(ip_addr) values ('0xc0a8b201'); -- hex version of
192.168.178.1
    insert into e(ip_addr) values ('192.168.178.1'); -- this one does work

The alternate syntax does work in Safari, and on command line utilities like
ping.
And if memory serves well, it worked in InternetExplorer 5.5 on Windows 2000
back in 2002.

Anyways, the documentation about the inet-type could say it only accepts
normalized forms of addresses. 

The wikipedia has some info on this:

https://en.wikipedia.org/wiki/IPv4#Address_representations


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

Предыдущее
От: hubert depesz lubaczewski
Дата:
Сообщение: Excessive number of replication slots for 12->14 logical replication
Следующее
От: David Johansen
Дата:
Сообщение: Re: Auto-vacuum timing out and preventing connections