Michael Meskes írta:
> On Tue, Feb 02, 2010 at 03:34:24PM +0100, Boszormenyi Zoltan wrote:
>   
>> Here's the new patch with the updated regression test.
>>     
>
> Committed. Thanks a lot.
>
> Michael
>   

Tom Lane committed a fix for Windows, there was a missing
#include <float.h>
in execute.c, but there is another problem on Windows, which
I can't fix since I don't have a Windows build system.
The linker also complains about missing _isnan(). Can someone help?
The equivalent of "-lm" is needed for the cl linker command.

Also, another oversight needs fixing on my part, for which
the patch is atttached. The INSERT statement in nan_test.pgc
contains platform dependent strings, "inf" instead of "infinity".

Best regards,
Zoltán Böszörményi

-- 
Bible has answers for everything. Proof:
"But let your communication be, Yea, yea; Nay, nay: for whatsoever is more
than these cometh of evil." (Matthew 5:37) - basics of digital technology.
"May your kingdom come" - superficial description of plate tectonics

----------------------------------
Zoltán Böszörményi
Cybertec Schönig & Schönig GmbH
http://www.postgresql.at/

diff -dcrpN pgsql.orig/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.c pgsql/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.c
*** pgsql.orig/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.c	2010-02-02 17:09:12.000000000 +0100
--- pgsql/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.c	2010-02-03 10:43:24.000000000 +0100
*************** if (sqlca.sqlcode < 0) sqlprint ( );}
*** 66,72 ****
  if (sqlca.sqlcode < 0) sqlprint ( );}
  #line 24 "nan_test.pgc"
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into nantest1 ( id , d ) values ( 1 , 'nan' :: float8 ) , ( 2 , 'inf' :: float8 ) , ( 3 , '-inf' :: float8 )", ECPGt_EOIT, ECPGt_EORT);
  #line 25 "nan_test.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint ( );}
--- 66,72 ----
  if (sqlca.sqlcode < 0) sqlprint ( );}
  #line 24 "nan_test.pgc"
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into nantest1 ( id , d ) values ( 1 , 'nan' :: float8 ) , ( 2 , 'infinity' :: float8 ) , ( 3 , '-infinity' :: float8 )", ECPGt_EOIT, ECPGt_EORT);
  #line 25 "nan_test.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint ( );}
diff -dcrpN pgsql.orig/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.stderr pgsql/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.stderr
*** pgsql.orig/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.stderr	2010-02-02 17:09:12.000000000 +0100
--- pgsql/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.stderr	2010-02-03 10:43:24.000000000 +0100
***************
*** 8,14 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 24: OK: CREATE TABLE
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 25: query: insert into nantest1 ( id , d ) values ( 1 , 'nan' :: float8 ) , ( 2 , 'inf' :: float8 ) , ( 3 , '-inf' :: float8 ); with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 25: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
--- 8,14 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 24: OK: CREATE TABLE
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ecpg_execute on line 25: query: insert into nantest1 ( id , d ) values ( 1 , 'nan' :: float8 ) , ( 2 , 'infinity' :: float8 ) , ( 3 , '-infinity' :: float8 ); with 0 parameter(s) on connection regress1
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_execute on line 25: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
diff -dcrpN pgsql.orig/src/interfaces/ecpg/test/pgtypeslib/nan_test.pgc pgsql/src/interfaces/ecpg/test/pgtypeslib/nan_test.pgc
*** pgsql.orig/src/interfaces/ecpg/test/pgtypeslib/nan_test.pgc	2010-02-02 17:09:12.000000000 +0100
--- pgsql/src/interfaces/ecpg/test/pgtypeslib/nan_test.pgc	2010-02-03 10:43:24.000000000 +0100
*************** main(void)
*** 22,28 ****
  	exec sql connect to REGRESSDB1;
  
  	exec sql create table nantest1 (id int4, d float8);
! 	exec sql insert into nantest1 (id, d) values (1, 'nan'::float8), (2, 'inf'::float8), (3, '-inf'::float8);
  
  	exec sql declare cur cursor for select id, d, d from nantest1;
  	exec sql open cur;
--- 22,28 ----
  	exec sql connect to REGRESSDB1;
  
  	exec sql create table nantest1 (id int4, d float8);
! 	exec sql insert into nantest1 (id, d) values (1, 'nan'::float8), (2, 'infinity'::float8), (3, '-infinity'::float8);
  
  	exec sql declare cur cursor for select id, d, d from nantest1;
  	exec sql open cur;
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to