X-Original-To: pgsql-odbc-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 7EF9F9FA5BE for ; Thu, 15 Jun 2006 13:58:56 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 18368-10 for ; Thu, 15 Jun 2006 13:58:44 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from carmel.tgice.com (ns1.tgice.com [65.43.58.90]) by postgresql.org (Postfix) with ESMTP id 1B28F9FA13E for ; Thu, 15 Jun 2006 13:58:43 -0300 (ADT) Received: (qmail 21775 invoked from network); 15 Jun 2006 11:58:41 -0500 Received: from unknown (HELO ?10.79.20.191?) (10.79.20.191) by ns1.tgice.com with AES256-SHA encrypted SMTP; 15 Jun 2006 11:58:41 -0500 Message-ID: <449191C5.5010800@tgice.com> Date: Thu, 15 Jun 2006 11:58:45 -0500 From: postgresql.org@tgice.com User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) MIME-Version: 1.0 To: pgsql-odbc@postgresql.org Subject: Re: float8 auto truncation issue in ODBC v. PGSQL References: <448F11E2.1020504@tgice.com> <10152.1150229689@sss.pgh.pa.us> In-Reply-To: <10152.1150229689@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/115 X-Sequence-Number: 7863 Tom Lane wrote: > By default, the float8 output routine prints a digit or so less than it > could, precisely to avoid that sort of unsightly result. You can fool > with float_extra_digits (I think that's the right name, check the docs) > if you need to adjust this behavior. Thanks Tom, You rock. The option is extra_float_digits. I figured Postgres would have something handy like this available. I just set that to "2" in my postgresql.conf (the maximum allowed value), and the psql queries return what I was trying to get. > This would only matter within a plpgsql function if you are doing > something that forces the binary value to be converted to text. Which, > if you're doing tense float computation, you probably don't want to have > happen at all. Yes, I'll have to look into this a bit more as the correct value still doesn't seem to be coming out of my function. John