Skip site navigation (1) Skip section navigation (2)

Re: Division in Postgre

From: "hatuan" <hatuan05(at)gmail(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Division in Postgre
Date: 2005-05-02 04:15:04
Message-ID: 000b01c54ecd$869ee670$0201a8c0@server (view raw, whole thread or download thread mbox)
Lists: pgsql-sql
Thank you
----- Original Message -----
From: "Stephan Szabo" <sszabo(at)megazone(dot)bigpanda(dot)com>
To: "tuan" <atuan_h(at)hotmail(dot)com>
Cc: <pgsql-sql(at)postgresql(dot)org>
Sent: Saturday, April 30, 2005 10:56 AM
Subject: Re: [SQL] Division in Postgre

> On Sun, 24 Apr 2005, tuan wrote:
> > In sql server my division select cast(3 as float)/10 is 0.29999999999.
> > But in postgres select cast(3 as float8)/10 is 0.3. How to get result
> > sql server?
> I believe you can control what precision is used in printing the float
> results with extra_float_digits. I believe setting it to 2 will give a
> 0.29... result however it has more 9s than the above.
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
>       message can get through to the mailing list cleanly

In response to

pgsql-sql by date

Next:From: Leo FinkDate: 2005-05-02 04:26:28
Subject: Re: Array of Arrays of int
Previous:From: Tom LaneDate: 2005-05-02 04:11:06
Subject: Re: Array of Arrays of int

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group