Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 1FE5E686C06 for ; Tue, 22 Jun 2010 10:41:26 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 18655-03-2 for ; Tue, 22 Jun 2010 13:41:17 +0000 (UTC) X-Greylist: delayed 03:11:28.039568 by SQLgrey-1.7.6 Received: from mail-pz0-f46.google.com (mail-pz0-f46.google.com [209.85.210.46]) by mail.postgresql.org (Postfix) with ESMTP id 8D29968745E for ; Tue, 22 Jun 2010 10:04:25 -0300 (ADT) Received: by pzk3 with SMTP id 3so153609pzk.19 for ; Tue, 22 Jun 2010 06:04:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=jz0AIspKEhne1kaKc+llny4KouwJx81verWbOvMFJeo=; b=EXc23DYXw2xzTa9KyDQ2ZKNpYnxsLDyJM0vfsdqePsT94rc4kq6lbaagijHHHHgM0T DutuTEPK5Hj2wXqk9QdkHw0B7kClH+NplCRCA5o8RaA3dgoYnmXqPe7z9bcP0u3Ng6+N +B/fdgmhkX1ruF3SM1k6VmpRaCm92o1Mo4mR8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=mE3laCxVst+SAGpMvBo9UEqripby90o9NSPuf9J6q+wSDR6SDpbACLyS0N43Z8lnX9 hmdaEaj1vJheRVOeG/r/y9St6O8TLoA7zGYlSlLfalb5I5xmuTeaGWRHsouPnmn7dcsJ s9OzywjoOdr9TK89JIDm7O9K+aI/y0f3deOzY= Received: by 10.143.87.6 with SMTP id p6mr4719651wfl.19.1277197195004; Tue, 22 Jun 2010 01:59:55 -0700 (PDT) Received: from [10.0.2.101] ([121.2.69.237]) by mx.google.com with ESMTPS id l29sm2809392rvb.4.2010.06.22.01.59.52 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 22 Jun 2010 01:59:53 -0700 (PDT) Message-ID: <4C207B8B.4030104@gmail.com> Date: Tue, 22 Jun 2010 17:59:55 +0900 From: Satoshi Nagayasu User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.1.10) Gecko/20100512 Thunderbird/3.0.5 MIME-Version: 1.0 To: Thom Brown , Magnus Hagander CC: pgsql-docs Subject: Re: INTEGER range ("-2147483648" is not accepted.) References: <4C207403.3080103@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201006/51 X-Sequence-Number: 5619 Magnus, Thanks for your advice. I've understood how it happens. However, it looks tricky and difficult to understand, so I hope that the message could be more understandable as Thom mentioned. Regards, On 2010/06/22 17:48, Thom Brown wrote: > On 22 June 2010 09:44, Magnus Hagander wrote: >> On Tue, Jun 22, 2010 at 10:27 AM, Satoshi Nagayasu >> wrote: >>> Hi all, >>> >>> I've found a bit strange thing on the INTEGER range in the official manual. >>> >>> http://www.postgresql.org/docs/8.4/interactive/datatype-numeric.html >>> >>> According to the official manual, the INTEGER range is "-2147483648 to +2147483647". >>> However, my example in below shows that "-2147483648" is not accepted. >>> >>> Is this correct? Any suggestions? >>> >>> template1=# SELECT -2147483648::integer; >>> ERROR: integer out of range >> >> This gets parsed as "cast 2147483648 to integer > > Why? And if so, it would probably be more useful if the error message > was something more like: > ERROR: integer 2147483648 out of range > > That would at least show the user what the value was seen as by the parser. > > Thom > -- NAGAYASU Satoshi