Steve Clark <sclark(at)netwolves(dot)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