Re: [BUGS] Bug #640: ECPG: inserting float numbers

2002-06-11 Thread Lee Kindness
Bruce, after checking the libecpg source i'm fairly sure the problem is due to the malloc buffer that the float is being sprintf'd into being too small... It is always allocated 20 bytes but with a %.14g printf specifier -6e-06 results in 20 characters: -6.0e-06 and the NULL goes...

Re: [BUGS] Bug #640: ECPG: inserting float numbers

2002-06-11 Thread Bruce Momjian
OK, I have reproduced the problem on my machine: #$ ./a.out floattest col1: -0.06 *!*!* Error -220: No such connection NULL in line 21. Wow, how did that "A" get into the query string: insert into tab1 ( col1 ) values ( -6.002122251e-06A ) Quite str

Re: [BUGS] Bug #640: ECPG: inserting float numbers

2002-06-11 Thread Lee Kindness
Bruce, the attached source reproduces this on 7.2, I don't have a later version at hand to test if it's been fixed: createdb floattest echo "CREATE TABLE tab1(col1 FLOAT);" | psql floattest ecpg insert-float.pgc gcc insert-float.c -lecpg -lpq ./a.out floattest results in: col1: -0.06

Re: [BUGS] Bug #640: ECPG: inserting float numbers

2002-06-10 Thread Bruce Momjian
Has this been addressed? Can you supply a reproducable example? --- Edward Pilipczuk wrote: > On Monday, 22 April 2002 18:41, you wrote: > > Edward ([EMAIL PROTECTED]) reports a bug with a severity of 1 > > The lower the n

Re: [BUGS] Bug #640: ECPG: inserting float numbers

2002-04-30 Thread Edward Pilipczuk
On Monday, 22 April 2002 18:41, you wrote: > Edward ([EMAIL PROTECTED]) reports a bug with a severity of 1 > The lower the number the more severe it is. > > Short Description > ECPG: inserting float numbers > > Long Description > Inserting records with single precision real variables having small

[BUGS] Bug #640: ECPG: inserting float numbers

2002-04-22 Thread pgsql-bugs
Edward ([EMAIL PROTECTED]) reports a bug with a severity of 1 The lower the number the more severe it is. Short Description ECPG: inserting float numbers Long Description Inserting records with single precision real variables having small value (range 1.0e-6 or less) frequently results in error