int to inet conversion

From: Anton Nikiforov <anton(at)nikiforov(dot)ru>
To: pgsql-general(at)postgresql(dot)org
Subject: int to inet conversion
Date: 2005-12-03 23:39:57
Message-ID: 43922CCD.7000108@nikiforov.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dear All.
is there any function that can translate INT to INET type?
the table contains ip and mask in different fields (int fields):

ip | integer | default 0
mask | integer | default -1

db=> select ip, mask from ips limit 2;
ip | mask
-------------+------
-1062726656 | -256
-1062724096 | -256

But i need inet or sidr records :)

Best regards,
Anton

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Assad Jarrahian 2005-12-03 23:48:28 pl_pgSQL array parameter and order of results returned
Previous Message Uwe C. Schroeder 2005-12-03 23:07:19 Re: 8.1, OID's and plpgsql