numeric to ipv6 inet - Mailing list pgsql-general

From Mikhail Puzanov
Subject numeric to ipv6 inet
Date
Msg-id CAJWC0jB4ZqrXi2RC9KLXb5mWsQuvc9u8H0-3p2_wOBP5k1c46Q@mail.gmail.com
Whole thread Raw
Responses Re: numeric to ipv6 inet  (Osvaldo Kussama <osvaldo.kussama@gmail.com>)
Re: numeric to ipv6 inet  (Arjen Nienhuis <a.g.nienhuis@gmail.com>)
List pgsql-general
Hello,

I need to convert the set of ipv6 addresses stored as numerics
(by historical reasons mostly) to inet type.

Something like
'0:0:0:0:0:0:0:0'::inet + 55831599345971591062080247067748335616::bigint
apparently doesn't work as the number added is too big to be converted to bigint.

Is there any reasonable way to do it in sql/pgplsql?

Thanks in advance.  

--
Best regards,
Mikhail V. Puzanov.

pgsql-general by date:

Previous
From: Vincent Veyron
Date:
Subject: Re: Locale Issue
Next
From: sachin kotwal
Date:
Subject: Re: filling database