Re: dotted quad netmask conversion
| От | Tom Lane |
|---|---|
| Тема | Re: dotted quad netmask conversion |
| Дата | |
| Msg-id | 23588.1291740219@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: dotted quad netmask conversion (Steve Clark <sclark@netwolves.com>) |
| Ответы |
Re: dotted quad netmask conversion
|
| Список | pgsql-general |
Steve Clark <sclark@netwolves.com> writes:
> Thanks for the response Jon. I should have stated this PG 8.1.x and '&'
> doesn't exist for network functions.
I don't think & does what you want anyway. It just does a bit AND on
the two addresses, it doesn't change the masklen property.
There's probably only a small number of distinct netmasks you actually
need to handle in this conversion. What I'd suggest is writing a simple
function with a CASE statement to translate netmask to an integer mask
length, and then you can use set_masklen to merge that result into the
address value.
regards, tom lane
В списке pgsql-general по дате отправления: