pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: hatuan <hatuan05@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Re: Division in Postgre
Date: Mon, 2 May 2005 11:15:04 +0700
Message-ID: <000b01c54ecd$869ee670$0201a8c0@server> (raw)
References: <BAY12-DAV1034161CFA2DABEF05BE2A972F0@phx.gbl>
	<20050429205407.B60676@megazone.bigpanda.com>

Thank you
----- Original Message -----
From: "Stephan Szabo" <sszabo@megazone.bigpanda.com>
To: "tuan" <atuan_h@hotmail.com>
Cc: <pgsql-sql@postgresql.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
like
> > 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@postgresql.org so that your
>       message can get through to the mailing list cleanly




view thread (3+ messages)

Message-ID: <000b01c54ecd$869ee670$0201a8c0@server>
Permalink:  ../000b01c54ecd$869ee670$0201a8c0@server/
Also on:    postgresql.org/message-id/000b01c54ecd$869ee670$0201a8c0@server

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: hatuan05@gmail.com
  Subject: Re: Division in Postgre
  In-Reply-To: <000b01c54ecd$869ee670$0201a8c0@server>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox