Re: INET/CIDR types
От | Alex Pilosov |
---|---|
Тема | Re: INET/CIDR types |
Дата | |
Msg-id | Pine.BSO.4.10.10007242252290.4362-100000@spider.pilosoft.com обсуждение исходный текст |
Ответ на | Re: INET/CIDR types (Larry Rosenman <ler@lerctr.org>) |
Ответы |
Re: INET/CIDR types
|
Список | pgsql-hackers |
On Mon, 24 Jul 2000, Larry Rosenman wrote: > > This whole discussion is quite silly guys. > > > > It is quite reasonable to have ability to split CIDR net into two pieces: > > the network and the bitshift. Second one is already possible, the first > > one can be accomplished by having functions to convert a cidr/inet to int8 > > (not int4 because of sign thing), and back. > > > > Its also very easy to implement ;) > > > > This will actually come very useful for many applications. Something I'm > > working on now (allocation of 'most appropriate' block) requires ability > > to split a netblock into two, which could be most easily accomplished > > using int8 math. (net::int8+2^(netmask(net)-1)). > All I'm looking for is to be able to print all 4 octets of an IP address > out so that joe user can take the 4 numbers and type it into the > 4 boxes on a Windows 98 box, and use them. > > Is that really that abhorrent? > > They also need the 4 octet netmask which I can get now. > > All we are missing is a way to print ALL 4 NUMBERS ALL THE TIME > for the output. It's not asking for classful, and for sure > we use CIDR all over the place, but for the final output that my > users see, why can't I have the database just print all 4 octets? Larry, With my suggestion, you can do it as follows: net::int8::inet (net being of cidr type) -alex
В списке pgsql-hackers по дате отправления: