On Tue, Nov 30, 2004 at 11:18:44AM +, Richard Huxton wrote:
> [EMAIL PROTECTED] 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
>
[EMAIL PROTECTED] wrote:
I have tried using the int8 also, even then i am having the problem.
Please CC the list.
The following works for me. I suspect your equivalent of "i" is an int4.
CREATE OR REPLACE FUNCTION test_int8(text) RETURNS int8 AS '
DECLARE
i int8;
tot int8;
BEGIN
i := CAST
[EMAIL PROTECTED] 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
Hi,
Am Dienstag, den 30.11.2004, 02:29 -0800 schrieb [EMAIL PROTECTED]:
> Hello,
>
> I am passing the ip address as a varchar. Eg: 133.9.4.11
>
> Later on i am splitting the ip address with the delimiter as '.'
>
>
> ip1t:= split_part($1,'.',1); // returns a text value
> ip2t:= split_part($1,'
Hello,
I am passing the ip address as a varchar. Eg: 133.9.4.11
Later on i am splitting the ip address with the delimiter as '.'
ip1t:= split_part($1,'.',1); // returns a text value
ip2t:= split_part($1,'.',2); // returns a text value
ip3t:= split_part($1,'.',3);
ip4t:= split_part($1,'.',4);
T