Re: floor function in 7.3b2

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: floor function in 7.3b2
Дата
Msg-id 21703.1033482705@sss.pgh.pa.us
обсуждение исходный текст
Ответ на floor function in 7.3b2  ("Mario Weilguni" <mario.weilguni@icomedias.com>)
Ответы some more minor incompatibilties 7.2 <-> 7.3  (Mario Weilguni <mweilguni@sime.com>)
Re: floor function in 7.3b2  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: floor function in 7.3b2  (Neil Conway <neilc@samurai.com>)
Список pgsql-hackers
"Mario Weilguni" <mario.weilguni@icomedias.com> writes:
> I noticed that some of my queries don't work anymore because they're using
> the floor function:
> e.g.: select type, floor(date_part('epoch', dataend)) as ts from
> last_modified
> Why is floor not working anymore?

Mph.  Seems we have floor(numeric) but not floor(float8), and the latter
is what you need here.

You could cast date_part's result to numeric; or perhaps you could use
trunc() which exists in both numeric and float8 flavors.  It's got
different semantics for negative inputs though.

For 7.4 we should take another look at the operator/function set and
fill in this hole and any others like it.
        regards, tom lane


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

Предыдущее
От: "Mario Weilguni"
Дата:
Сообщение: floor function in 7.3b2
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: 7.2.3 patching done