timespan/2

Поиск
Список
Период
Сортировка
От Carlos Fonseca
Тема timespan/2
Дата
Msg-id Pine.LNX.3.96.990109221411.8450A-100000@gaivota.localnet
обсуждение исходный текст
Список pgsql-general
Dear all,

I need to compute the half of given timespan values, and was surprised to
see that, e.g., ('1h'::timespan)/2 doesn't work, whereas
('1h'::timespan)/(2::timespan) does. This isn't just inconvenient, it
looks wrong as well: try '1h'::timespan/'0s300ms'::timespan,
when you really mean '1h'::timespan/0.3.

Is this a bug or a design decision? Shouldn't division of two timespan
values return a float, and division of a timespan value by an int/float
return a timespan? I am using postgresql v6.4.2.

Please Cc: any replies to me, as I am not on the list (for now)...

TIA,

Carlos



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

Предыдущее
От: Oleg Broytmann
Дата:
Сообщение: Z Object Publisher got Postgres adapter
Следующее
От: "Thomas G. Lockhart"
Дата:
Сообщение: [Fwd: [HACKERS] postgres and dates (year 2000? not!)]