dotted quad netmask conversion - Mailing list pgsql-general

From Steve Clark
Subject dotted quad netmask conversion
Date
Msg-id 4CFE4FFC.9010500@netwolves.com
Whole thread Raw
Responses Re: dotted quad netmask conversion  (Jon Nelson <jnelson+pgsql@jamponi.net>)
List pgsql-general
Hello All,

I am working with a postgresql database that has two columns.
One for an ip address and another for the netmask. Both of these
columns are char varying(30). I would like to convert to just
one column as inet. Any one know a slick way to convert the
dotted quad netmask, E.G. 255.255.128.0, to number of bits. I didn't
see any way directly looking at the network functions in the PG documentation.

Thanks in advance for your consideration.
--
Stephen Clark
NetWolves
Sr. Software Engineer III
Phone: 813-579-3200
Fax: 813-882-0209
Email: steve.clark@netwolves.com
http://www.netwolves.com

pgsql-general by date:

Previous
From: Michał Roszka
Date:
Subject: Re: SELECT is immediate but the UPDATE takes forever
Next
From: Andy Colson
Date:
Subject: Re: Do we want SYNONYMS?