From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Alex Pilosov <alex(at)pilosoft(dot)com> |
Cc: | Larry Rosenman <ler(at)lerctr(dot)org>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Summary: what to do about INET/CIDR |
Date: | 2000-10-28 02:53:06 |
Message-ID: | 6298.972701586@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 network from 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
From | Date | Subject | |
---|---|---|---|
Next Message | Larry Rosenman | 2000-10-28 03:04:39 | Re: Summary: what to do about INET/CIDR |
Previous Message | Alex Pilosov | 2000-10-28 02:36:45 | Re: Summary: what to do about INET/CIDR |