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 1mL3ck-00049m-DA for pgsql-hackers@arkaria.postgresql.org; Tue, 31 Aug 2021 13:16:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mL3ci-00060w-Ut for pgsql-hackers@arkaria.postgresql.org; Tue, 31 Aug 2021 13:16:20 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mL3ci-0005yE-Mb for pgsql-hackers@lists.postgresql.org; Tue, 31 Aug 2021 13:16:20 +0000 Received: from relay10.mail.gandi.net ([217.70.178.230]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mL3cc-00034c-P5 for pgsql-hackers@lists.postgresql.org; Tue, 31 Aug 2021 13:16:19 +0000 Received: (Authenticated sender: adsend@dunslane.net) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 2D0F3240006; Tue, 31 Aug 2021 13:16:09 +0000 (UTC) Subject: Re: pgsql: Avoid using ambiguous word "positive" in error message. To: Robert Haas , Tom Lane Cc: Fujii Masao , PostgreSQL Hackers References: <1349356.1630332976@sss.pgh.pa.us> From: Andrew Dunstan Message-ID: Date: Tue, 31 Aug 2021 09:16:07 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 8/30/21 10:19 AM, Robert Haas wrote: > On Mon, Aug 30, 2021 at 10:16 AM Tom Lane wrote: >> Robert Haas writes: >>> The new style seems good, but I don't really agree that "positive" and >>> "non-negative" are ambiguous. "positive" means >0 and "non-negative" >>> means >= 0, because 0 is neither positive nor negative. >> Well, the point is precisely that not everyone makes that distinction. >> I agree that everyone will read "non-negative" as ">= 0"; but there's >> a fair percentage of the population that uses "positive" the same way. > The mathematician in me recoils. > Yep, me too. IIRC Ada comes with a predefined subtype named "Positive" which has the range 1..Integer'Max. It also has "Natural" which includes zero. cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com