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
Re: floor function in 7.3b2 Re: floor function in 7.3b2 |
| Список | 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 по дате отправления: