Search Postgresql Archives

Re: Strange input/cast semantics for inet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux