Skip site navigation (1) Skip section navigation (2)

Re: float8 auto truncation issue in ODBC v. PGSQL

From: postgresql(dot)org(at)tgice(dot)com
To: pgsql-odbc(at)postgresql(dot)org
Subject: Re: float8 auto truncation issue in ODBC v. PGSQL
Date: 2006-06-15 16:58:45
Message-ID: 449191C5.5010800@tgice.com (view raw or flat)
Thread:
Lists: pgsql-odbc
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

In response to

pgsql-odbc by date

Next:From: postgres.orgDate: 2006-06-15 17:26:22
Subject: case sensitivity on table & column names / workaround?
Previous:From: Hiroshi InoueDate: 2006-06-15 13:00:22
Subject: Re: Memory Leak ?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group