Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mdupi-0005Zz-F3 for pgsql-docs@arkaria.postgresql.org; Fri, 22 Oct 2021 13:43:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mduph-0003fG-EH for pgsql-docs@arkaria.postgresql.org; Fri, 22 Oct 2021 13:43:41 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mdupg-0003f7-IZ for pgsql-docs@lists.postgresql.org; Fri, 22 Oct 2021 13:43:41 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mdupc-0008UA-FN for pgsql-docs@lists.postgresql.org; Fri, 22 Oct 2021 13:43:40 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id DBE7F5C00C4; Fri, 22 Oct 2021 09:43:33 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Fri, 22 Oct 2021 09:43:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=atIPaWCDnDyIfKsJ+Q6Imry/KY4Av2wG5nBsEwMyQC0=; b=cgyKdlOZ Z2+BGbT/SHeeDbcvuThcqDZwNuJkKdMrLdMQW7Jz/m/ihKLusJEWiOt8Mn1yAZFu +UsVr/up06FInLEd9gXTc0O5FkBSAvD+uScl6SQNvWi3I9vwULJiR9tEyCKQUWEp 2Qh7oUGwT1O+ZrMFAOBq8u6hWVCqiqwdJvlmF+DchJVGvGKM5bft497o+b1M+0wa z0vh5jYmwGMVx1MoteeN9CGFXx+cFHNQtxiohUWPyGSTXCKRgCVbMeTjBD1S7I5z uDWcORf+y6+jo6XARQczDEv5dL2BEZbpx07hQU4gxdnZ+Ieqw9bIO23A8GjALB0J diECOAqfi5OMTw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddvkedgieehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpeetlhhvrghr ohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqe enucggtffrrghtthgvrhhnpeduheejiefhfeekuedvteelueefudfgudehudfhgfefjeei jeeugefhgfefjedvheenucffohhmrghinhepphhoshhtghhrvghsqhhlrdhorhhgpdgvnh htvghrphhrihhsvggusgdrtghomhdpsghurhhnihhnghgsihhrugdrnhgvthenucevlhhu shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhvhhgvrhhrvg esrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 22 Oct 2021 09:43:33 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 26E7F2A06D7; Fri, 22 Oct 2021 10:43:30 -0300 (-03) Date: Fri, 22 Oct 2021 10:43:30 -0300 From: Alvaro Herrera To: kjs@teews.com, pgsql-docs@lists.postgresql.org Cc: Michael Meskes Subject: Re: documentation describing the range of a number type 'integer' is incorrect Message-ID: <202110221343.rgmrpm6sy3be@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <162759765986.25752.13395472408540963267@wrigleys.postgresql.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021-Jul-29, PG Doc comments form wrote: > https://www.postgresql.org/docs/13/datatype-numeric.html says that the range > of a numeric type integer is -2147483648 to +2147483647 but > PGTYPESnumeric_to_int considers -2147483648 (a perfectly valid 32-bit > integer) to be invalid because it compares to -INT_MAX instead of INT_MIN or > (-INT_MAX - 1). This goes back to the initial commit in the git repo for > src/interfaces/ecpg/pgtypeslib/numeric.c. And doc/src/sgml/ecpg.sgml > documents the min being -INT_MAX. This sounds like an ECPG bug, not a documentation problem. -- Álvaro Herrera 39°49'30"S 73°17'W — https://www.EnterpriseDB.com/ "XML!" Exclaimed C++. "What are you doing here? You're not a programming language." "Tell that to the people who use me," said XML. https://burningbird.net/the-parable-of-the-languages/