Re: Why 'infinity' is not in range '[2019-01-02, infinity]'? - Mailing list pgsql-docs

From Eugen Konkov
Subject Re: Why 'infinity' is not in range '[2019-01-02, infinity]'?
Date
Msg-id 376945611.20191026161529@yandex.ru
Whole thread Raw
In response to Re: Why 'infinity' is not in range '[2019-01-02, infinity]'?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Why 'infinity' is not in range '[2019-01-02, infinity]'?  (Bruce Momjian <bruce@momjian.us>)
List pgsql-docs
Today I got next ambiguous:

select tstzrange( 'infinity', null );
  tstzrange
-------------
 [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 the lower bound are included in the range.
>This is equivalent to considering that the upper bound is “plus infinity”, respectively.

Thus I can write, can not?

select tstzrange( 'infinity', 'infinity' );
  tstzrange
-------------
 empty
(1 row)

But thus it is not not equivalent.


>But note that these infinite values are never values of the range's element type, and can never be part of the range
Thus if 'infinite values are never values of the range' then

“infinity” can not be just another value of any range type
This conclusion contradicts next doc paragraph:
>Also, some element types have a notion of “infinity”, but that is just another value so far as the range type
mechanismsare concerned. 

errr...   mechanism  of  date  ranges  violates basic rules  for  'Infinite
(Unbounded) Ranges'?


--
Best regards,
Eugen Konkov




pgsql-docs by date:

Previous
From: PG Doc comments form
Date:
Subject: Correction For PostgreSQL Manual
Next
From: PG Doc comments form
Date:
Subject: Duplicating Records When Inserting