From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Mario Weilguni <mario(dot)weilguni(at)icomedias(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: floor function in 7.3b2 |
Date: | 2002-10-04 02:26:30 |
Message-ID: | 200210040226.g942QUi26102@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Added to TODO:
* Add floor(float8) and other missing functions
---------------------------------------------------------------------------
Tom Lane wrote:
> "Mario Weilguni" <mario(dot)weilguni(at)icomedias(dot)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(at)postgresql(dot)org
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2002-10-04 02:29:12 | Re: [HACKERS] pg7.3b1 |
Previous Message | Bruce Momjian | 2002-10-04 02:23:47 | Re: How to REINDEX in high volume environments? |