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 1kfNpm-0001Co-IY for pgsql-docs@arkaria.postgresql.org; Wed, 18 Nov 2020 13:49:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kfNpl-0005Ef-Dj for pgsql-docs@arkaria.postgresql.org; Wed, 18 Nov 2020 13:49:17 +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 1kfNpl-0005EY-7w for pgsql-docs@lists.postgresql.org; Wed, 18 Nov 2020 13:49:17 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kfNpi-00010P-66 for pgsql-docs@lists.postgresql.org; Wed, 18 Nov 2020 13:49:16 +0000 Received: from hnk.local (p1295030-ipngn4902funabasi.chiba.ocn.ne.jp [153.166.85.30]) by oss.nttdata.com (Postfix) with ESMTPSA id 5BACB62589; Wed, 18 Nov 2020 22:49:10 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.3 at oss.nttdata.com Subject: Re: Documentation of return values of range functions lower and upper To: Laurenz Albe , jani.rahkola@iki.fi, pgsql-docs@lists.postgresql.org References: <160508672127.25505.8356390205508789564@wrigleys.postgresql.org> <53ec9f116bea9252d7fa9341e024530553656c42.camel@cybertec.at> <16601466752e40543051369fac722c0a200bb4e6.camel@cybertec.at> From: Fujii Masao Message-ID: <27d690d8-0987-5f2b-a2da-fc2ec7c19e3c@oss.nttdata.com> Date: Wed, 18 Nov 2020 22:49:10 +0900 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.4.3 MIME-Version: 1.0 In-Reply-To: <16601466752e40543051369fac722c0a200bb4e6.camel@cybertec.at> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020/11/12 17:14, Laurenz Albe wrote: > On Wed, 2020-11-11 at 18:19 +0100, Laurenz Albe wrote: >>> Table 9.54 in page >>> https://www.postgresql.org/docs/current/functions-range.html states that the >>> functions lower and upper return NULL if the requested bound is infinite. If >>> the element type of the range contains the special values infinity and >>> -infinity, this is not correct, as those values are returned if explicitly >>> used as either bound. >> >> +1 >> >> Perhaps it would be better to say >> >> NULL if the range is empty or has no lower/upper bound I agree this description looks a bit confusing. But according to the section "Infinite (Unbounded) Ranges" (*1), we already call "lower/upper bound omitted" just infinite. So I don't think the current description is incorrect. (*1) https://www.postgresql.org/docs/devel/rangetypes.html#RANGETYPES-INFINITE Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION