Re: Strange input/cast semantics for inet

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Strange input/cast semantics for inet
Дата
Msg-id 200507220514.j6M5EiO09595@candle.pha.pa.us
обсуждение исходный текст
Ответ на Strange input/cast semantics for inet  (Greg Stark <gsstark@mit.edu>)
Список pgsql-general
Greg Stark wrote:
>
> This looks very strange to me:
>
> staging=> select '1.10'::cidr;
>     cidr
> -------------
>  1.10.0.0/16
> (1 row)
>
>
> The normal way to read "1.10" would be as synonymous with "1.0.0.10". This is
> even mandated by the POSIX spec for getaddrinfo and company. q

Interesting.  Inet doesn't allow it, but I assume CIDR does because it
is a network and the trailing values are just assumed to be zero.  It
looks OK to me as a CIDR.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

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

Предыдущее
От: Benjamin Smith
Дата:
Сообщение: Dumb question about count()
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: Dumb question about count()