| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера