Re: [HACKERS] cidr

Поиск
Список
Период
Сортировка
От darcy@druid.net (D'Arcy J.M. Cain)
Тема Re: [HACKERS] cidr
Дата
Msg-id m0yzvd6-00006FC@druid.net
обсуждение исходный текст
Ответ на Re: [HACKERS] cidr  (Bruce Momjian <maillist@candle.pha.pa.us>)
Ответы Re: [HACKERS] cidr  (Bruce Momjian <maillist@candle.pha.pa.us>)
Список pgsql-hackers
Thus spake Bruce Momjian
> > I do like the idea of using attypmod to define the form of the type.
> > I assume we can use that to determine the output format, that is, use
> > it to effectively apply one of the functions to it.  That makes for
> > a clean use of the type.
>
> OK.  Sounds good to me.  The only problem is display.  If we don't
> indicate whether it is a cidr or host/netmask on column creation or
> insertion, how do we display it so it makes sense?  Always cidr?

Well, I guess we just decide on a default format if it is not defined.
I think the default should be display as cidr (x.x.x.x/y) except omit
the mask length if it is 32 (or -1 if we go with that usage.)  Perhaps
make one of the defined types always display cidr even in thos special
cases.

> > I agree.  I'm just saying that we can add the netmask function to integer
> > as well.  That gives someone the flexibility to store it either way.
> > However, I don't think I am going to speak to this point again until
> > someone can give me a single example of a requirement for storing
> > netmasks independent of any hosts or networks.  :-)
>
> OK.  Why not?

I'm just saying that given that there isn't any useful situation where
we might want to store netmasks alone independent of IPs, I don't see
much point in arguing how many IPs can dance on the end of a netmask.

--
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 424 2871     (DoD#0082)    (eNTP)   |  what's for dinner.

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [GENERAL] Re: [INTERFACES] ODBC Driver -- Access Order By problem solved!!!
Следующее
От: Egon Schmid
Дата:
Сообщение: Compile of recent CVS fails