Re: Maximum limit on int in plpgsql
От
Richard Huxton
Тема
Re: Maximum limit on int in plpgsql
Дата
Msg-id
41AC5714.1050405@archonet.com
Ответ на
Maximum limit on int in plpgsql (deepthi@granwill.com)
Список
Дерево обсуждения
Maximum limit on int in plpgsql deepthi@granwill.com
Re: Maximum limit on int in plpgsql Tino Wildenhain <tino@wildenhain.de>
Re: Maximum limit on int in plpgsql Richard Huxton <dev@archonet.com>
Re: Maximum limit on int in plpgsql Steve Atkins <steve@blighty.com>
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
В списке pgsql-general по дате отправления