X-Original-To: pgsql-interfaces@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 012724762CF for ; Wed, 7 May 2003 12:40:37 -0400 (EDT) Received: from mxzilla1.xs4all.nl (mxzilla1.xs4all.nl [194.109.6.54]) by postgresql.org (Postfix) with ESMTP id 6BD21476493 for ; Wed, 7 May 2003 12:40:26 -0400 (EDT) Received: from xs1.xs4all.nl (xs1.xs4all.nl [194.109.3.11]) by mxzilla1.xs4all.nl (8.12.3/8.12.3) with ESMTP id h47GeUpI003981; Wed, 7 May 2003 18:40:30 +0200 (CEST) Received: from xs1.xs4all.nl (jtv@localhost.xs4all.nl [127.0.0.1]) by xs1.xs4all.nl (8.12.9/8.11.6) with ESMTP id h47GeUrR090702; Wed, 7 May 2003 18:40:30 +0200 (CEST) (envelope-from jtv@xs1.xs4all.nl) Received: (from Unknown UID 8109@localhost) by xs1.xs4all.nl (8.12.9/8.12.8/Submit) id h47GePwV090698; Wed, 7 May 2003 18:40:25 +0200 (CEST) (envelope-from jtv) Date: Wed, 7 May 2003 18:40:25 +0200 From: "Jeroen T. Vermeulen" To: Tom Lane Cc: pgsql-interfaces@postgresql.org Subject: Re: GetValue(), floats, and locales Message-ID: <20030507164025.GG48885@xs4all.nl> Mail-Followup-To: Tom Lane , pgsql-interfaces@postgresql.org References: <20030507133633.GD48885@xs4all.nl> <27744.1052324342@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <27744.1052324342@sss.pgh.pa.us> User-Agent: Mutt/1.4.1i X-Spam-Status: No, hits=-38.0 required=5.0 tests=BAYES_10,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REFERENCES,REPLY_WITH_QUOTES,USER_AGENT_MUTT autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200305/21 X-Sequence-Number: 4139 On Wed, May 07, 2003 at 12:19:02PM -0400, Tom Lane wrote: > > The server should always ship floats in "standard" representation. > AFAIK the only way to use localized numeric representations is to > write to_char() and to_number() calls (or use the money datatype). > If you can show us a case where plain float display does the other, > it's a bug. I personally can't show you anything except a bug report from my user, but I'll encourage him to post it here. He complains that libpqxx can't read the fraction part of a floating-point number, which boils down to a sscanf(GetValue(c,x,y), "%f", &f) always returning f as an integral value. Of course it's also possible that there's a bug in his display code or that I'm missing something very, very important. Time to add some FP test cases... Jeroen