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

Поиск
Список
Период
Сортировка
От Eugen Konkov
Тема Re: Why 'infinity' is not in range '[2019-01-02, infinity]'?
Дата
Msg-id 376945611.20191026161529@yandex.ru
обсуждение исходный текст
Ответ на Re: Why 'infinity' is not in range '[2019-01-02, infinity]'?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Why 'infinity' is not in range '[2019-01-02, infinity]'?  (Bruce Momjian <bruce@momjian.us>)
Список 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 по дате отправления:

Предыдущее
От: PG Doc comments form
Дата:
Сообщение: Correction For PostgreSQL Manual
Следующее
От: PG Doc comments form
Дата:
Сообщение: Duplicating Records When Inserting