| From: | Lee Kindness <lkindness(at)csl(dot)co(dot)uk> | 
|---|---|
| To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> | 
| Cc: | edx(at)astercity(dot)net, pgsql-bugs(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org, Lee Kindness <lkindness(at)csl(dot)co(dot)uk> | 
| Subject: | Re: Bug #640: ECPG: inserting float numbers | 
| Date: | 2002-06-11 10:51:50 | 
| Message-ID: | 15621.54854.130976.87612@kelvin.csl.co.uk | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-bugs pgsql-hackers | 
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.000006
 *!*!* Error -400: 'ERROR:  parser: parse error at or near "a"' in line 21.
and in epcgdebug:
 [29189]: ECPGexecute line 21: QUERY: insert into tab1 ( col1  ) values ( -6.0000002122251e-06A ) on connection floattest
 [29189]: ECPGexecute line 21: Error: ERROR:  parser: parse error at or near "a"
 [29189]: raising sqlcode -400 in line 21, ''ERROR:  parser: parse error at or near "a"' in line 21.'.
Regards, Lee Kindness.
Bruce Momjian writes:
 > Has this been addressed?  Can you supply a reproducable example?
 > Edward Pilipczuk wrote:
 > > On Monday, 22 April 2002 18:41, you wrote:
 > > > Edward (edx(at)astercity(dot)net) reports a bug with a severity of 1
 > > > ECPG: inserting float numbers
 > > > Inserting records with single precision real variables having small value
 > > > (range 1.0e-6 or less) frequently results in errors in ECPG translations
 > > > putting into resulted sql statement unexpected characters => see fragments
 > > > of sample code and ECPGdebug log where after value of rate variable the
 > > > unexpected character '^A' appears
 > > >
 > > > Sample Code
 > > > [ snip ]
| Attachment | Content-Type | Size | 
|---|---|---|
| unknown_filename | text/plain | 689 bytes | 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2002-06-11 10:58:54 | Re: Bug #640: ECPG: inserting float numbers | 
| Previous Message | pgsql-bugs | 2002-06-11 01:53:08 | Bug #688: dump/reinstall fails with local sameuser security | 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Hannu Krosing | 2002-06-11 10:52:41 | Re: Timestamp/Interval proposals: Part 2 | 
| Previous Message | Hannu Krosing | 2002-06-11 10:02:49 | Re: [HACKERS] Efficient DELETE Strategies |