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 mechanisms are concerned.

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


-- 
Best regards,
Eugen Konkov



Reply via email to