Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 33E1B632AEE for ; Tue, 22 Jun 2010 05:49:19 -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 24202-04 for ; Tue, 22 Jun 2010 08:49:11 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wy0-f174.google.com (mail-wy0-f174.google.com [74.125.82.174]) by mail.postgresql.org (Postfix) with ESMTP id E52AB63265A for ; Tue, 22 Jun 2010 05:49:11 -0300 (ADT) Received: by wyb33 with SMTP id 33so2929715wyb.19 for ; Tue, 22 Jun 2010 01:49:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=wF/NIGByCsALzAe5iF+KBIIM18SlYvFEU0Egm/eyfI4=; b=acmQ3yKRI4JfJIZNNIicjWJ4UHYyzS3chbwVX+t7S3XY4rlFxQi6m4mgwUX/FVyFTu UQbZO76oSRCRRzbMKVJnhQYepyqaHBNrTx73Q1+Mj/UzbsHRzQiJSNaOSwVjBJcqDweI wTKMpVBjF1B9t47PcyjhSN35ogWXDCLxfNmQI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=ZeIzCUey15bwhxYN8r5PHU9M5YkGNpnW6HjBdzhLD8R5LraAkBlWaj9coJJMZH9vU1 iWj078/1lpiBLzRvobhX04PreFkd8uBaYewpcyiyJQwvq4vm/ycdL6Xi7zEonbh5zDi8 8oB2Vy52v+TefJsA7QG3r8LwIQp8y6EY4VSVQ= Received: by 10.216.154.69 with SMTP id g47mr4297460wek.82.1277196549293; Tue, 22 Jun 2010 01:49:09 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.231.221 with HTTP; Tue, 22 Jun 2010 01:48:49 -0700 (PDT) In-Reply-To: References: <4C207403.3080103@gmail.com> From: Thom Brown Date: Tue, 22 Jun 2010 09:48:49 +0100 Message-ID: Subject: Re: INTEGER range ("-2147483648" is not accepted.) To: Magnus Hagander Cc: Satoshi Nagayasu , pgsql-docs Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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/46 X-Sequence-Number: 5614 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 manu= al. >> >> 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=3D# SELECT -2147483648::integer; >> ERROR: =A0integer 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