Re: [GENERAL] Strange input/cast semantics for inet

2005-07-21 Thread Bruce Momjian
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

Re: [GENERAL] Strange input/cast semantics for inet

2005-07-21 Thread Michael Fuhr
On Thu, Jul 21, 2005 at 10:14:42PM -0400, Greg Stark wrote: > Michael Fuhr <[EMAIL PROTECTED]> writes: > > > I don't know if it's ever been blessed by a formal standard > > It's blessed by POSIX: > > http://www.opengroup.org/onlinepubs/009695399/functions/inet_addr.html Yep, that's lifted almost

Re: [GENERAL] Strange input/cast semantics for inet

2005-07-21 Thread Greg Stark
Michael Fuhr <[EMAIL PROTECTED]> writes: > On Thu, Jul 21, 2005 at 06:38:01PM -0400, Tom Lane wrote: > > Greg Stark <[EMAIL PROTECTED]> writes: > > > The normal way to read "1.10" would be as synonymous with "1.0.0.10". > > > > That might be the case for IPv6, but it's never been a standard > >

Re: [GENERAL] Strange input/cast semantics for inet

2005-07-21 Thread Michael Fuhr
On Thu, Jul 21, 2005 at 06:38:01PM -0400, Tom Lane wrote: > Greg Stark <[EMAIL PROTECTED]> writes: > > The normal way to read "1.10" would be as synonymous with "1.0.0.10". > > That might be the case for IPv6, but it's never been a standard > convention for IPv4; and even for IPv6 it doesn't make

Re: [GENERAL] Strange input/cast semantics for inet

2005-07-21 Thread Tom Lane
Greg Stark <[EMAIL PROTECTED]> writes: > The normal way to read "1.10" would be as synonymous with "1.0.0.10". That might be the case for IPv6, but it's never been a standard convention for IPv4; and even for IPv6 it doesn't make any sense for a network (as opposed to host) number.

[GENERAL] Strange input/cast semantics for inet

2005-07-21 Thread Greg Stark
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 -- greg ---(end