Re: floor function in 7.3b2 - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: floor function in 7.3b2
Date
Msg-id 200210040226.g942QUi26102@candle.pha.pa.us
Whole thread Raw
In response to Re: floor function in 7.3b2  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Added to TODO:
* Add floor(float8) and other missing functions

---------------------------------------------------------------------------

Tom Lane wrote:
> "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
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
> 

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: How to REINDEX in high volume environments?
Next
From: Tom Lane
Date:
Subject: Re: Improving backend startup interlock