Re: 'infinity'::Interval should be added

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: 'infinity'::Interval should be added
Дата
Msg-id
25913.1544821903@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
'infinity'::Interval should be added Simon Riggs <simon@2ndquadrant.com>
Re: 'infinity'::Interval should be added Chapman Flack <chap@anastigmatix.net>
Re: 'infinity'::Interval should be added Tom Lane <tgl@sss.pgh.pa.us>
Re: 'infinity'::Interval should be added Robert Haas <robertmhaas@gmail.com>
Re: 'infinity'::Interval should be added Isaac Morland <isaac.morland@gmail.com>
Re: 'infinity'::Interval should be added Tom Lane <tgl@sss.pgh.pa.us>
Re: 'infinity'::Interval should be added Robert Haas <robertmhaas@gmail.com>
Re: 'infinity'::Interval should be added Simon Riggs <simon@2ndquadrant.com>
Re: 'infinity'::Interval should be added Tom Lane <tgl@sss.pgh.pa.us>
Re: 'infinity'::Interval should be added Andres Freund <andres@anarazel.de>
Re: 'infinity'::Interval should be added Andres Freund <andres@anarazel.de>
Re: 'infinity'::Interval should be added Tom Lane <tgl@sss.pgh.pa.us>
Re: 'infinity'::Interval should be added Andres Freund <andres@anarazel.de>
Re: 'infinity'::Interval should be added Tom Lane <tgl@sss.pgh.pa.us>
Re: 'infinity'::Interval should be added Robert Haas <robertmhaas@gmail.com>
Re: 'infinity'::Interval should be added Tom Lane <tgl@sss.pgh.pa.us>
Re: 'infinity'::Interval should be added Simon Riggs <simon@2ndquadrant.com>
Re: 'infinity'::Interval should be added Tom Lane <tgl@sss.pgh.pa.us>
Re: 'infinity'::Interval should be added Isaac Morland <isaac.morland@gmail.com>
Re: 'infinity'::Interval should be added Tom Lane <tgl@sss.pgh.pa.us>
Re: 'infinity'::Interval should be added Chapman Flack <chap@anastigmatix.net>
Re: 'infinity'::Interval should be added Isaac Morland <isaac.morland@gmail.com>
Isaac Morland  writes:
> I would be interested if you have an example where the ability of
> date/timestamp values to be infinite adds special case coding.

I think Robert is talking about the implementation functions for
timestamp-related operations, which typically do have to special-case
infinite inputs.  I take your point that there might be fewer special
cases in the calling SQL code, though.

> The wart I'm worried about is subtraction of infinite dates. Right now
> dates subtract to give integers; and there are no infinite integers. All
> the clever solutions to this I have right now involve making highly
> backward-incompatible changes.

As far as that goes, I'm content to say that infinity is outside the
domain of type date.  If you need infinities, use timestamp.

			regards, tom lane

В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата:
От: John Naylor
Дата:
FAQ