Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qyYuS-009AiE-Kc for pgsql-docs@arkaria.postgresql.org; Thu, 02 Nov 2023 14:43:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qyYuR-00Dign-6A for pgsql-docs@arkaria.postgresql.org; Thu, 02 Nov 2023 14:42:59 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qyYuQ-00Dige-Qp for pgsql-docs@lists.postgresql.org; Thu, 02 Nov 2023 14:42:58 +0000 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qyYuO-003cQW-90 for pgsql-docs@lists.postgresql.org; Thu, 02 Nov 2023 14:42:57 +0000 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-4094301d505so7976945e9.2 for ; Thu, 02 Nov 2023 07:42:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20230601.gappssmtp.com; s=20230601; t=1698936175; x=1699540975; darn=lists.postgresql.org; h=mime-version:user-agent:references:in-reply-to:date:cc:to:from :subject:message-id:from:to:cc:subject:date:message-id:reply-to; bh=Oi9QKNnOX3jS5IdI2Yi69SmVfWwP9g7yAOJHhbehfO4=; b=wtgdPNhoNZwtgRXD51hQLZ8AxN7U0lQ9pZedet7Me++I6pbhixP5H1TX74H5W3zDRv ZyhjwjsdFZUY74IPyWAkwV9AOpcRLFtBND8P/87qpkGcxjbhL3bBzs0usHfgDITKUFk/ Qsho4mgXzJGY8KSOPBp4t6N5mDOMl6MLMSBRbIEJz89hZ3UPNWv0+kKQrEwMWx7U/75p 1dqZPB9bSnR83REyX2cvCfhxrKOcpmOHqGkCEip5p76/60BsotswAYjkMVutc4SXjulI 9lOrZkpNT8cDyno1ZXd9Yd+YOf+PML2Hyxs6so6v5YHtWt7buGeIYS7lR99XyO5ognnM 9pEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698936175; x=1699540975; h=mime-version:user-agent:references:in-reply-to:date:cc:to:from :subject:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Oi9QKNnOX3jS5IdI2Yi69SmVfWwP9g7yAOJHhbehfO4=; b=r+lQiIcN6yDJsVBmp8tzKcbXalWxl2Ue67+dmb/sXVv2ioWiPhvskEI/jFGEamYBIs 4DBMUbvrIiYnhjKKqMDMAkmRTAog5mu2ukmwgnEcRk5+B2hD7nQBFbRD2oi8iB6Aa3jP oSZ8Aj+MycH+xVPS5SdgqHcTiZMEL+sXvDBzwCZdGaxFCYzKnSS3VF9wROJw2PyCTRMA eNsqf0g1Map5B/raxakcg7UVM1oLJC+tg/9Ft23NkGm3EZWWnkUfId7aH6td3mpDg+Vn JmHBcRuvxg0WDN0yssFjNBVoFdAqNFHaGYCuPoysSX7ARjPxXaBHf7Sz5e3uL4bOQ+ZR 0Qfg== X-Gm-Message-State: AOJu0Yzbmz0zcUo/mlfHX4YNo2atHtxfIiAw4miAd7ZI0KSxhzvM/erG yoZsqRptNBnYTWfMprOtoDVOwQ== X-Google-Smtp-Source: AGHT+IEMROYOHTem9VNWwOlnb8vFCmeRFtErxnDIAQAZU5N8Nai4pG3RDZEgTPa9vmaf5mpLvntyZA== X-Received: by 2002:a05:600c:3c97:b0:406:eef6:3540 with SMTP id bg23-20020a05600c3c9700b00406eef63540mr15618458wmb.0.1698936174516; Thu, 02 Nov 2023 07:42:54 -0700 (PDT) Received: from localhost.localdomain ([2001:871:5e:671d:efcb:786d:3c60:89d1]) by smtp.gmail.com with ESMTPSA id fm21-20020a05600c0c1500b0040849ce7116sm3232339wmb.43.2023.11.02.07.42.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 07:42:54 -0700 (PDT) Message-ID: <687683a11c0d8bd0466cedbcb99d098c11f31f97.camel@cybertec.at> Subject: Re: Documentation of return values of range functions lower and upper From: Laurenz Albe To: Bruce Momjian Cc: Fujii Masao , jani.rahkola@iki.fi, pgsql-docs@lists.postgresql.org Date: Thu, 02 Nov 2023 15:42:53 +0100 In-Reply-To: References: <160508672127.25505.8356390205508789564@wrigleys.postgresql.org> <53ec9f116bea9252d7fa9341e024530553656c42.camel@cybertec.at> <16601466752e40543051369fac722c0a200bb4e6.camel@cybertec.at> <27d690d8-0987-5f2b-a2da-fc2ec7c19e3c@oss.nttdata.com> <02f3fa3a592fa6c1f8ec1a9f539ae376f744eb42.camel@cybertec.at> Content-Type: multipart/mixed; boundary="=-T1QmVVPtagedZ6g1EeFg" User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --=-T1QmVVPtagedZ6g1EeFg Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2023-11-02 at 10:14 -0400, Bruce Momjian wrote: > Better, though "Is the range's upper bound unbounded?" makes me cringe. >=20 > Oh, yeah, totally cringe, me too.=C2=A0 :-) >=20 > > It is not the bound that is bounded or not, but the range. > >=20 > > How about "Is the range unbounded at the upper end?" or "Does the range > > have no upper bound?" >=20 > I used your "end" idea to modify the patch, attached. There are still some loose ends: - you lost the specification whether it is the upper or the lower bound - "Infinity" is a literal - "-Infinity" is a very unlikely value for an upper bound How about the attached version? Yours, Laurenz Albe --=-T1QmVVPtagedZ6g1EeFg Content-Disposition: attachment; filename="range.V2.diff" Content-Transfer-Encoding: 7bit Content-Type: text/x-patch; name="range.V2.diff"; charset="us-ascii" diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index c76ec52c55..c2f266ea24 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -19905,7 +19905,7 @@ SELECT NULLIF(value, '(none)') ... Extracts the lower bound of the range (NULL if the - range is empty or the lower bound is infinite). + range is empty or has no lower bound). lower(numrange(1.1,2.2)) @@ -19923,7 +19923,7 @@ SELECT NULLIF(value, '(none)') ... Extracts the upper bound of the range (NULL if the - range is empty or the upper bound is infinite). + range is empty or has no upper bound). upper(numrange(1.1,2.2)) @@ -19991,7 +19991,8 @@ SELECT NULLIF(value, '(none)') ... boolean - Is the range's lower bound infinite? + Does the range have no lower bound? (A lower bound of + -Infinity returns false.) lower_inf('(,)'::daterange) @@ -20008,7 +20009,8 @@ SELECT NULLIF(value, '(none)') ... boolean - Is the range's upper bound infinite? + Does the range have no upper bound? (An upper bound of + Infinity returns false.) upper_inf('(,)'::daterange) @@ -20063,7 +20065,7 @@ SELECT NULLIF(value, '(none)') ... Extracts the lower bound of the multirange (NULL if the - multirange is empty or the lower bound is infinite). + multirange is empty has no lower bound). lower('{[1.1,2.2)}'::nummultirange) @@ -20081,7 +20083,7 @@ SELECT NULLIF(value, '(none)') ... Extracts the upper bound of the multirange (NULL if the - multirange is empty or the upper bound is infinite). + multirange is empty or has no upper bound). upper('{[1.1,2.2)}'::nummultirange) @@ -20149,7 +20151,8 @@ SELECT NULLIF(value, '(none)') ... boolean - Is the multirange's lower bound infinite? + Does the multirange have no lower bound? (A lower bound of + -Infinity returns false.) lower_inf('{(,)}'::datemultirange) @@ -20166,7 +20169,8 @@ SELECT NULLIF(value, '(none)') ... boolean - Is the multirange's upper bound infinite? + Does the multirange have no upper bound? (An upper bound of + Infinity returns false.) upper_inf('{(,)}'::datemultirange) --=-T1QmVVPtagedZ6g1EeFg--