Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iOLuu-0003TG-Qn for pgsql-docs@arkaria.postgresql.org; Sat, 26 Oct 2019 13:15:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iOLus-00064W-KU for pgsql-docs@arkaria.postgresql.org; Sat, 26 Oct 2019 13:15:38 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iOLus-00064P-9l for pgsql-docs@lists.postgresql.org; Sat, 26 Oct 2019 13:15:38 +0000 Received: from forward106o.mail.yandex.net ([2a02:6b8:0:1a2d::609]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iOLup-00010y-Ve for pgsql-docs@lists.postgresql.org; Sat, 26 Oct 2019 13:15:37 +0000 Received: from forward102q.mail.yandex.net (forward102q.mail.yandex.net [IPv6:2a02:6b8:c0e:1ba:0:640:516:4e7d]) by forward106o.mail.yandex.net (Yandex) with ESMTP id E756F5061CA1; Sat, 26 Oct 2019 16:15:31 +0300 (MSK) Received: from mxback1q.mail.yandex.net (mxback1q.mail.yandex.net [IPv6:2a02:6b8:c0e:39:0:640:25b3:aea5]) by forward102q.mail.yandex.net (Yandex) with ESMTP id E2C7B7F20002; Sat, 26 Oct 2019 16:15:31 +0300 (MSK) Received: from vla3-ead3590a0ae9.qloud-c.yandex.net (vla3-ead3590a0ae9.qloud-c.yandex.net [2a02:6b8:c15:258b:0:640:ead3:590a]) by mxback1q.mail.yandex.net (nwsmtp/Yandex) with ESMTP id GDjSigQslz-FVFmm8IK; Sat, 26 Oct 2019 16:15:31 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1572095731; bh=mEiEW0JlfsCaEQHoEQVPuN6fIMyZ9VzmqDDO58WQtpg=; h=In-Reply-To:Subject:CC:To:From:References:Date:Message-ID; b=DigP7IgwYVeYlTlVqFQf85tvQis9FcYu0ip3KTIzdNrQnlYUKI2oCMFGipnaYZxnL LPHKYl9ifCw6F7axV7oDSGpjNqePHTQWSnFjyfNZj8Tdil3lO0Sz7+No4wUHMG5Tx6 1rq0i7JLY+aerS1F3PvWfZ8aH6ZBIQ5MZ0++fADc= Authentication-Results: mxback1q.mail.yandex.net; dkim=pass header.i=@yandex.ru Received: by vla3-ead3590a0ae9.qloud-c.yandex.net (nwsmtp/Yandex) with ESMTPSA id xTF4NQxIv4-FU0i69vt; Sat, 26 Oct 2019 16:15:30 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) Date: Sat, 26 Oct 2019 16:15:29 +0300 From: Eugen Konkov Message-ID: <376945611.20191026161529@yandex.ru> X-Confirm-Reading-To: kes-kes@yandex.ru Disposition-Notification-To: kes-kes@yandex.ru To: Tom Lane CC: pgsql-docs@lists.postgresql.org Subject: Re: Why 'infinity' is not in range '[2019-01-02, infinity]'? In-Reply-To: <7991.1556573455@sss.pgh.pa.us> References: <155655432452.1371.6115195379691603427@wrigleys.postgresql.org> <5f6b986b-de4d-8a43-1366-fc8c3aed6319@postgresql.org> <1265663903.20190429212216@yandex.ru> <7991.1556573455@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1250 Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Today I got next ambiguous: select tstzrange( 'infinity', null ); tstzrange =20 ------------- [infinity,) (1 row) [DOC](https://www.postgresql.org/docs/12/rangetypes.html) stated: >if the upper bound of the range is omitted, then all points greater than t= he lower bound are included in the range. >This is equivalent to considering that the upper bound is =93plus infinity= =94, respectively. Thus I can write, can not? select tstzrange( 'infinity', 'infinity' ); tstzrange =20 ------------- empty (1 row) But thus it is not not equivalent. >But note that these infinite values are never values of the range's elemen= t type, and can never be part of the range Thus if 'infinite values are never values of the range' then =93infinity=94 can not be just another value of any range type This conclusion contradicts next doc paragraph: >Also, some element types have a notion of =93infinity=94, but that is just= another value so far as the range type mechanisms are concerned. errr... mechanism of date ranges violates basic rules for 'Infinite (Unbounded) Ranges'? --=20 Best regards, Eugen Konkov