Re: Summary: what to do about INET/CIDR

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Summary: what to do about INET/CIDR
Дата
Msg-id 6298.972701586@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Summary: what to do about INET/CIDR  (Alex Pilosov <alex@pilosoft.com>)
Список pgsql-hackers
>>>> e) have a function network(inet) which would look up the address in a
>>>> table of networks using longest-prefix-match. I.E. something similar to:

>> No need.  Let the user do it themselves. Similar to what we did for
>> macaddr's back in the summer. 

> Yeah, it can be user-defined (or a contrib), no question about it, and for
> people who have more than one table of networks, it will _have_ to be
> user-defined.

It seems clear to me that this mapping is best left to the user.

A more interesting question is whether the system needs to provide any
assisting functions that aren't there now.  The lookup function you guys
are postulating seems like it would be (in the simple cases)create function my_network(inet) returns cidr as'select
networkfrom my_networks where ???'
 
Maybe it's too late at night, but I'm having a hard time visualizing
what the ??? condition is and whether any additional system-level
functions are needed to make it simple/efficient.
        regards, tom lane


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

Предыдущее
От: Alex Pilosov
Дата:
Сообщение: Re: Summary: what to do about INET/CIDR
Следующее
От: Alex Pilosov
Дата:
Сообщение: Re: Summary: what to do about INET/CIDR