Re: Add operator for dividing interval by an interval

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Add operator for dividing interval by an interval
Дата
Msg-id 3894515.1684443804@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Add operator for dividing interval by an interval  (Andres Freund <andres@anarazel.de>)
Ответы Re: Add operator for dividing interval by an interval  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> What about an interval / interval -> double operator that errors out whenever
> month is non-zero? As far as I can tell that would always be deterministic.

We have months, days, and microseconds, and microseconds-per-day isn't
much more stable than days-per-month (because DST).  By the time you
restrict this to give deterministic results, I think it won't be
particularly useful.

You could arbitrarily define months as 30 days and days as 24 hours,
which is what some other interval functions do, and then the double
result would be well-defined; but how useful is it really?

            regards, tom lane



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: PG 16 draft release notes ready
Следующее
От: Przemysław Sztoch
Дата:
Сообщение: Re: [PATCH] Support % wildcard in extension upgrade filenames