Re: Data Type precision - Mailing list pgsql-sql

From Jie Liang
Subject Re: Data Type precision
Date
Msg-id 39D0DFC0.A4C00EFA@ipinc.com
Whole thread Raw
In response to Data Type precision  (Jerome Raupach <jraupach@intelcom.fr>)
Responses Three Unrelated Questions  ("Josh Berkus" <josh@agliodbs.com>)
List pgsql-sql
Hi, there,

You can use function:

urldb=# select round(234.356534,2);round
--------234.36
(1 row)


Jerome Raupach wrote:

> CREATE TABLE TR (f1 FLOAT4, f2 INT4, f3 INT4) ;
>
> UPDATE TR SET f1=f2/f3::FLOAT4 ;
>
> f1 -> xxxxxx,xxxxxx  -  but I want f1 -> xxxxxx,xx.
>           (6,6)                              (6,2)
>
> anybody can help me ?
> Thanks. Jerome.

--
Jie LIANG

Internet Products Inc.

10350 Science Center Drive
Suite 100, San Diego, CA 92121
Office:(858)320-4873

jliang@ipinc.com
www.ipinc.com





pgsql-sql by date:

Previous
From: "Edipo E. F. Melo"
Date:
Subject: date is not equals to dia/month/year: what's wrong?
Next
From: "Josh Berkus"
Date:
Subject: Three Unrelated Questions