Search Postgresql Archives

Re: Strange input/cast semantics for inet

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

 



On Thu, Jul 21, 2005 at 10:14:42PM -0400, Greg Stark wrote:
> Michael Fuhr <mike@xxxxxxxx> 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 verbatim out of the 4.2BSD inet(3) manual
page.

> I'm really skeptical Vixie would have written things this way. Perhaps
> somebody at some point later misunderstood the convention and "fixed" the
> behaviour?

I just ran some tests with the inet_net_pton() function found in
the BIND 4.9.11 source code and it behaves the same way as the code
in PostgreSQL, viz., 10.1 becomes 10.1.0.0.  The code I used had
the following rcsid:

$Id: inet_net_pton.c,v 8.3 1996/11/11 06:36:52 vixie Exp $

Maybe Vixie didn't like the convention or think it was worth
implementing for his needs.

Aside from the rare use of "ping 127.1", I do find it more useful
to interpret 10.1 as 10.1.0.0 since I'm more likely to use 10.1 as
an abbreviation for the "ten dot one network" than as shorthand for
10.0.0.1.  I expect I'm not alone in that.

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/

---------------------------(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