Re: Absolute value of intervals

Поиск
Список
Период
Сортировка
От Ron Mayer
Тема Re: Absolute value of intervals
Дата
Msg-id 4AEEE76F.2090807@cheapcomplexdevices.com
обсуждение исходный текст
Ответ на Re: Absolute value of intervals  (Sam Mason <sam@samason.me.uk>)
Список pgsql-general
On Mon, Nov 02, 2009 at 10:52:40AM +0000, Jasen Betts wrote:
> what's the absolute value of '1month -30 days'::interval

Curious what a use case for taking the absolute value
of such mixed intervals might be.

I could imagine such intervals being used for stuff like
"XXX is due in Y months but needs to be submitted Z days earlier".

But I can't really imagine worrying about if it's positive
or negative until it's evaluated at a particular date (i.e.
reporting "XXX has to be submitted in N days" or
"XXX was supposed to be submitted N days ago").


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

Предыдущее
От: Raymond O'Donnell
Дата:
Сообщение: Re: 2009-11-02 08:31:30 EST:user@host(48990):4562ERROR: current transaction is aborted, commands ignored until end of transaction block
Следующее
От: CaT
Дата:
Сообщение: Re: Absolute value of intervals