Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Wq1IK-0003QT-JZ for pgsql-bugs@arkaria.postgresql.org; Thu, 29 May 2014 14:27:00 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Wq1IJ-0003aw-Tn for pgsql-bugs@arkaria.postgresql.org; Thu, 29 May 2014 14:26:59 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Wq1IJ-0003aq-0G for pgsql-bugs@postgresql.org; Thu, 29 May 2014 14:26:59 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Wq1IF-00031G-FK for pgsql-bugs@postgresql.org; Thu, 29 May 2014 14:26:57 +0000 Received: by mail.anarazel.de (Postfix, from userid 108) id 14D364E8006; Thu, 29 May 2014 16:26:53 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mail X-Spam-Level: X-Spam-Status: No, score=-5.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from anarazel.de (p5DDC7DA2.dip0.t-ipconnect.de [93.220.125.162]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id AA8864E8003; Thu, 29 May 2014 16:26:50 +0200 (CEST) Received: by anarazel.de (Postfix, from userid 1000) id 37F6E100DB2; Thu, 29 May 2014 16:26:50 +0200 (CEST) Date: Thu, 29 May 2014 16:26:50 +0200 From: Andres Freund To: maxim.boguk@gmail.com Cc: pgsql-bugs@postgresql.org Subject: Re: BUG #10457: Problem with double precision field. Message-ID: <20140529142650.GN27914@awork2.anarazel.de> References: <20140529135629.10406.69681@wrigleys.postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140529135629.10406.69681@wrigleys.postgresql.org> X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Hi, On 2014-05-29 13:56:29 +0000, maxim.boguk@gmail.com wrote: > PostgreSQL version: 9.0.17 > [local]:5432 postgres@comon3=# select record_rating from rating.record > where record_rating>0 order by 1 limit 50; > record_rating > ---------------------- > 6.5397686164648e-309 > 8.1108289380243e-309 > 2.0326868922821e-308 > and so on... > > But: > select '6.5397686164648e-309'::double precision; > ERROR: "6.5397686164648e-309" is out of range for type double precision > LINE 2: select '6.5397686164648e-309'::double precision; Those are 'denormalized' floating point numbers. Code to handle those was added to 9.2+ in http://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=c318aeed84438619fc6b8c647def1730a110f04b I guess it could be backpatched now that it has survived testing for a fair while. It's annoying not to be able to restore data... Till then you can just apply the patch. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs