Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id D88631337B4A for ; Fri, 25 Feb 2011 11:21:35 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 13564-02 for ; Fri, 25 Feb 2011 15:21:30 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 40DA21337B2F for ; Fri, 25 Feb 2011 11:21:28 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p1PFLPM4021331; Fri, 25 Feb 2011 10:21:25 -0500 (EST) To: Merlin Moncure cc: Greg Stark , "Nathan M. Davalos" , pgsql-bugs@postgresql.org Subject: Re: Function trunc() behaves in unexpected manner with different data types In-reply-to: References: <2701CF596B80DC44815FDBFFF5881A1E0104BB63@exchange01.sharedmarketing.com> Comments: In-reply-to Merlin Moncure message dated "Fri, 25 Feb 2011 08:46:29 -0600" Date: Fri, 25 Feb 2011 10:21:25 -0500 Message-ID: <21330.1298647285@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201102/218 X-Sequence-Number: 29490 Merlin Moncure writes: > right -- in understand how floating point works -- but are you are > saying that you are ok with the fact that (for example) a table with a > floating point unique key could dump and not restore? more > specifically, a binary dump would restore but a text dump would not. pg_dump takes measures against that (see extra_float_digits). > I think this is a problem with our implementation -- not all versions > of 2183.68 as outputted from the server are the same internally. It's an inherent property of float math. Yes, we could set the default value of extra_float_digits high enough that distinct internal values always had distinct text representations, but trust me, you would not like it. regards, tom lane