deepthi@granwill.com wrote:
> The i am taking the sum using this formula
>
> out_sum=ip1*256*256*256+ip2*256*256+ip3*256+ip4;
>
> When i run the procedure i am getting following error
> pg_atoi : Numerical result out of range
>
> I tried all possible datatypes but still i am getting the same error.
>
> Is it the problem of typecasting or the limits on datatype?
Type integer=int4 and is signed. IP addresses are unsigned. You'll need
to use an int8 to hold them.
--
Richard Huxton
Archonet Ltd