Re: Returning 'Infinity'::TIMESTAMPTZ from "to_timestamp" function

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Returning 'Infinity'::TIMESTAMPTZ from "to_timestamp" function
Дата
Msg-id 21367.1447046745@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Returning 'Infinity'::TIMESTAMPTZ from "to_timestamp" function  (Vitaly Burovoy <vitaly.burovoy@gmail.com>)
Список pgsql-hackers
Vitaly Burovoy <vitaly.burovoy@gmail.com> writes:
> To add an ability to construct 'Infinity' TIMESTAMPTZ via
> "to_timestamp" call, there are two ways:

> 1. Rewrite the function "pg_catalog.to_timestamp(double precision)" as
> an internal one. It's the easiest way, because it allows to avoid
> usage of INTERVAL as a helper (of course, there is still possible to
> use intervals as shown above in user's scripts, but without "Infinity"
> support).

> 2. Add support of infinite intervals. It is harder, because it touches
> a lot of functions. I can add that support if it is in demand.

> Which way is preferred?

I think you should stay away from infinite intervals; that seems like
there would be a lot of definitional questions to be resolved.  Even
if we decide we want to deal with that someday, it shouldn't be a blocking
issue for conversion between infinite floats and infinite timestamps.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Vitaly Burovoy
Дата:
Сообщение: Returning 'Infinity'::TIMESTAMPTZ from "to_timestamp" function
Следующее
От: Ashutosh Bapat
Дата:
Сообщение: Re: Transactions involving multiple postgres foreign servers