X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5CB683A5155 for ; Tue, 30 Nov 2004 09:48:08 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 34821-09 for ; Tue, 30 Nov 2004 09:48:00 +0000 (GMT) Received: from rigel.lunarpages.com (rigel.lunarpages.com [64.235.230.106]) by svr1.postgresql.org (Postfix) with ESMTP id 3D8AD3A5142 for ; Tue, 30 Nov 2004 09:48:01 +0000 (GMT) Received: from cpanel by rigel.lunarpages.com with local (Exim 4.43) id 1CZ4cB-0000Mm-8N; Tue, 30 Nov 2004 01:48:07 -0800 Received: from 61.11.66.222 ([61.11.66.222]) by granwill.com (IMP) with HTTP for ; Tue, 30 Nov 2004 01:48:07 -0800 Message-ID: <1101808087.41ac41d7382a9@granwill.com> Date: Tue, 30 Nov 2004 01:48:07 -0800 From: deepthi@granwill.com To: pgsql-jdbc@postgresql.org Subject: Maximum limit on int in plpgsql MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.2 X-Originating-IP: 61.11.66.222 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - rigel.lunarpages.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [32001 32003] / [47 12] X-AntiAbuse: Sender Address Domain - granwill.com X-Source: /usr/local/cpanel/3rdparty/bin/php X-Source-Args: /usr/local/cpanel/3rdparty/bin/php /usr/local/cpanel/base/horde/imp/compose.php X-Source-Dir: :/base/horde/imp X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.3 tagged_above=0.0 required=5.0 tests=NO_REAL_NAME X-Spam-Level: X-Archive-Number: 200411/231 X-Sequence-Number: 11653 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); Then i am type casting it into an integer select into ip1 cast(ip1t as integer); select into ip2 cast(ip2t as integer); select into ip3 cast(ip3t as integer); select into ip4 cast(ip4t as integer); 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? Thank you in advance, deepthi