Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 601EB6329BB for ; Wed, 23 Jun 2010 05:18:28 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 27053-06 for ; Wed, 23 Jun 2010 08:18:20 +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 17772632288 for ; Wed, 23 Jun 2010 05:18:20 -0300 (ADT) Received: by wyi11 with SMTP id 11so518484wyi.19 for ; Wed, 23 Jun 2010 01:18:18 -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=1DJOa0mnthwfW+eJ10fUJNGS5OGAeYdWRn/MwYPf3tk=; b=gYV8/ME0EdO+zMB2XVFFryx1E2IRr+LI1hM+H7rr9JZrFZB2OEqyyoiqDRqM2Md1Uv qEidlpG6xIcTeQsgsuyvrV1yjE+utai2rQZ3X+1bFcYJTa8k557gsuZquBURWFczMunR iRLbSFDvjlJkpuHWOicnCOetFX4iAitu45xn0= 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=KVMwoZEAK0as6K/Y2H8LQMggMeT3RoSCEHJq5FFGtNmzXsgqKkDCnbXRvD8wSH3yyg cUHACdMDKasZ2UHxuDkktL9d4JxWnAaKvCAnyYBRisoQy005ua0FQR4w8VqoDBNcVPTo aYse+3DF0oqDNsjJEZz0K1LrKL7hQnzRBdNZA= Received: by 10.216.169.1 with SMTP id m1mr2203661wel.42.1277281098173; Wed, 23 Jun 2010 01:18:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.231.221 with HTTP; Wed, 23 Jun 2010 01:17:58 -0700 (PDT) In-Reply-To: <11645.1277257777@sss.pgh.pa.us> References: <4C207403.3080103@gmail.com> <20100622230754.GE15203@fetter.org> <11645.1277257777@sss.pgh.pa.us> From: Thom Brown Date: Wed, 23 Jun 2010 09:17:58 +0100 Message-ID: Subject: Re: INTEGER range ("-2147483648" is not accepted.) To: Tom Lane Cc: David Fetter , Satoshi Nagayasu , pgsql-docs@postgresql.org 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/58 X-Sequence-Number: 5626 On 23 June 2010 02:49, Tom Lane wrote: > Thom Brown writes: >> Is that the right behaviour though? =A0Shouldn't the signed value reach >> the cast step rather than the absolute value? =A0Or maybe Postgres could >> implicitly accept -12345::integer to be (-12345)::integer. =A0Is there a >> blocking reason as to why it must work this way? > > Yes. =A0There is no reason to assume that - means the same thing for ever= y > datatype. =A0In general, :: should (and does) bind tighter than *every* > operator, to ensure that the appropriately typed operator is applied. > Okay. I'll admit that this won't be a common case, but could the error message make reference to the value it took? Thom