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

Re: GetValue(), floats, and locales

From: "Jeroen T(dot) Vermeulen" <jtv(at)xs4all(dot)nl>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: GetValue(), floats, and locales
Date: 2003-05-07 16:40:25
Message-ID: 20030507164025.GG48885@xs4all.nl (view raw or flat)
Thread:
Lists: pgsql-interfaces
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


In response to

Responses

pgsql-interfaces by date

Next:From: s0229007Date: 2003-05-07 17:17:30
Subject: inserting large object with attribute by through libpq
Previous:From: Tom LaneDate: 2003-05-07 16:19:02
Subject: Re: GetValue(), floats, and locales

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