X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 888DE5E46DC for ; Tue, 24 Aug 2004 16:52:43 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 53917-01 for ; Tue, 24 Aug 2004 19:52:39 +0000 (GMT) Received: from davinci.ethosmedia.com (server226.ethosmedia.com [209.128.84.226]) by svr1.postgresql.org (Postfix) with ESMTP id 87D335E46C3 for ; Tue, 24 Aug 2004 16:52:38 -0300 (ADT) Received: from [63.195.55.98] (HELO spooky) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 6165325; Tue, 24 Aug 2004 12:53:53 -0700 Content-Type: text/plain; charset="iso-8859-1" From: Josh Berkus Organization: Aglio Database Solutions To: "Adam Lancaster" , Subject: Re: Possible rounding error of large float values? Date: Tue, 24 Aug 2004 12:52:30 -0700 User-Agent: KMail/1.4.3 References: <8758F8D58219684FAB0239EE8967048A010807@calculon.preventsys.com> In-Reply-To: <8758F8D58219684FAB0239EE8967048A010807@calculon.preventsys.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200408241252.30182.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/256 X-Sequence-Number: 18753 Adam, > 9223372036854775807 > > It gets selected out as: > > 9.22337203685478E18 This is a property of FLOAT data types. They round. > Which appears to be rounded. When we cast it to numeric type we get: > > 9223372036854780000 > > Which also is rounded. It is still possible to find the row using the > original value Hmmm ... is 15 digits the limit of NUMERIC? It may be. > Is this expected behavior? Yes. -- Josh Berkus Aglio Database Solutions San Francisco