From 38d8dce61fff09daae0edb6bcdd42b0c7f10ebcd Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 8 Oct 2019 10:27:30 +0200 Subject: [PATCH] Remove some code for old unsupported versions of MSVC As of d9dd406fe281d22d5238d3c26a7182543c711e74, we require MSVC 2013, which means _MSC_VER >= 1800. This means that conditionals about older versions of _MSC_VER can be removed or simplified. Previous code was also in some cases handling MinGW, where _MSC_VER is not defined at all, incorrectly, such as in pg_ctl.c and win32_port.h, leading to some compiler warnings. This should now be handled better. Reviewed-by: Michael Paquier --- src/backend/utils/adt/pg_locale.c | 23 +- src/backend/utils/adt/selfuncs.c | 13 - src/bin/pg_ctl/pg_ctl.c | 31 -- src/include/pg_config.h.win32 | 33 +- src/include/port/win32.h | 2 +- src/include/port/win32_port.h | 12 - src/include/utils/float.h | 4 +- .../ecpg/test/expected/pgtypeslib-nan_test.c | 107 +++-- .../test/expected/pgtypeslib-nan_test.stderr | 394 +++++++++--------- .../ecpg/test/pgtypeslib/nan_test.pgc | 7 - src/port/chklocale.c | 4 +- src/tools/msvc/Solution.pm | 2 - 12 files changed, 255 insertions(+), 377 deletions(-) diff --git a/src/backend/utils/adt/pg_locale.c b/src/backend/utils/adt/pg_locale.c index b2f08ead45..2a076a3dfd 100644 --- a/src/backend/utils/adt/pg_locale.c +++ b/src/backend/utils/adt/pg_locale.c @@ -973,7 +973,7 @@ cache_locale_time(void) static char * IsoLocaleName(const char *winlocname) { -#if (_MSC_VER >= 1400) /* VC8.0 or later */ +#ifdef _MSC_VER static char iso_lc_messages[32]; _locale_t loct = NULL; @@ -987,7 +987,6 @@ IsoLocaleName(const char *winlocname) loct = _create_locale(LC_CTYPE, winlocname); if (loct != NULL) { -#if (_MSC_VER >= 1700) /* Visual Studio 2012 or later */ size_t rc; char *hyphen; @@ -1014,28 +1013,10 @@ IsoLocaleName(const char *winlocname) hyphen = strchr(iso_lc_messages, '-'); if (hyphen) *hyphen = '_'; -#else - char isolang[32], - isocrty[32]; - LCID lcid; - - lcid = loct->locinfo->lc_handle[LC_CTYPE]; - if (lcid == 0) - lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); - _free_locale(loct); - - if (!GetLocaleInfoA(lcid, LOCALE_SISO639LANGNAME, isolang, sizeof(isolang))) - return NULL; - if (!GetLocaleInfoA(lcid, LOCALE_SISO3166CTRYNAME, isocrty, sizeof(isocrty))) - return NULL; - snprintf(iso_lc_messages, sizeof(iso_lc_messages) - 1, "%s_%s", isolang, isocrty); -#endif return iso_lc_messages; } - return NULL; -#else +#endif /* _MSC_VER */ return NULL; /* Not supported on this version of msvc/mingw */ -#endif /* _MSC_VER >= 1400 */ } #endif /* WIN32 && LC_MESSAGES */ diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c index 17101298fb..35a8995f62 100644 --- a/src/backend/utils/adt/selfuncs.c +++ b/src/backend/utils/adt/selfuncs.c @@ -4092,20 +4092,7 @@ convert_string_datum(Datum value, Oid typid, Oid collid, bool *failure) * crashes since it will only give an estimation error and nothing * fatal. */ -#if _MSC_VER == 1400 /* VS.Net 2005 */ - - /* - * - * http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=99694 - */ - { - char x[1]; - - xfrmlen = strxfrm(x, val, 0); - } -#else xfrmlen = strxfrm(NULL, val, 0); -#endif #ifdef WIN32 /* diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c index 316651ced2..eac4e771ab 100644 --- a/src/bin/pg_ctl/pg_ctl.c +++ b/src/bin/pg_ctl/pg_ctl.c @@ -137,12 +137,7 @@ static void print_msg(const char *msg); static void adjust_data_dir(void); #ifdef WIN32 -#if (_MSC_VER >= 1800) #include -#else -static bool IsWindowsXPOrGreater(void); -static bool IsWindows7OrGreater(void); -#endif static bool pgwin32_IsInstalled(SC_HANDLE); static char *pgwin32_CommandLine(bool); static void pgwin32_doRegister(void); @@ -1378,32 +1373,6 @@ do_kill(pgpid_t pid) #ifdef WIN32 -#if (_MSC_VER < 1800) -static bool -IsWindowsXPOrGreater(void) -{ - OSVERSIONINFO osv; - - osv.dwOSVersionInfoSize = sizeof(osv); - - /* Windows XP = Version 5.1 */ - return (!GetVersionEx(&osv) || /* could not get version */ - osv.dwMajorVersion > 5 || (osv.dwMajorVersion == 5 && osv.dwMinorVersion >= 1)); -} - -static bool -IsWindows7OrGreater(void) -{ - OSVERSIONINFO osv; - - osv.dwOSVersionInfoSize = sizeof(osv); - - /* Windows 7 = Version 6.0 */ - return (!GetVersionEx(&osv) || /* could not get version */ - osv.dwMajorVersion > 6 || (osv.dwMajorVersion == 6 && osv.dwMinorVersion >= 0)); -} -#endif - static bool pgwin32_IsInstalled(SC_HANDLE hSCM) { diff --git a/src/include/pg_config.h.win32 b/src/include/pg_config.h.win32 index a330df9d9d..36e6bdc303 100644 --- a/src/include/pg_config.h.win32 +++ b/src/include/pg_config.h.win32 @@ -268,14 +268,10 @@ /* #undef HAVE_LONG_INT_64 */ /* Define to 1 if the system has the type `long long int'. */ -#if (_MSC_VER > 1200) #define HAVE_LONG_LONG_INT 1 -#endif /* Define to 1 if `long long int' works and is 64 bits. */ -#if (_MSC_VER > 1200) #define HAVE_LONG_LONG_INT_64 1 -#endif /* Define to 1 if you have the `mbstowcs_l' function. */ #define HAVE_MBSTOWCS_L 1 @@ -347,10 +343,7 @@ /* #undef HAVE_READLINK */ /* Define to 1 if you have the `rint' function. */ -#if (_MSC_VER >= 1800) #define HAVE_RINT 1 -#endif - /* Define to 1 if you have the global variable 'rl_completion_append_character'. */ @@ -387,9 +380,7 @@ #define HAVE_SSL_GET_CURRENT_COMPRESSION 1 /* Define to 1 if stdbool.h conforms to C99. */ -#if (_MSC_VER >= 1800) #define HAVE_STDBOOL_H 1 -#endif /* Define to 1 if you have the header file. */ /* #undef HAVE_STDINT_H */ @@ -415,25 +406,15 @@ /* Define to 1 if you have the `strtoll' function. */ #ifdef HAVE_LONG_LONG_INT_64 #define HAVE_STRTOLL 1 -/* Before VS2013, use Microsoft's nonstandard equivalent function */ -#if (_MSC_VER < 1800) -#define strtoll _strtoi64 -#endif #endif /* Define to 1 if you have the `strtoull' function. */ #ifdef HAVE_LONG_LONG_INT_64 #define HAVE_STRTOULL 1 -/* Before VS2013, use Microsoft's nonstandard equivalent function */ -#if (_MSC_VER < 1800) -#define strtoull _strtoui64 -#endif #endif /* Define to 1 if the system has the type `struct addrinfo'. */ -#if (_MSC_VER > 1200) #define HAVE_STRUCT_ADDRINFO 1 -#endif /* Define to 1 if the system has the type `struct cmsgcred'. */ /* #undef HAVE_STRUCT_CMSGCRED */ @@ -445,14 +426,10 @@ /* #undef HAVE_STRUCT_SOCKADDR_SA_LEN */ /* Define to 1 if the system has the type `struct sockaddr_storage'. */ -#if (_MSC_VER > 1200) #define HAVE_STRUCT_SOCKADDR_STORAGE 1 -#endif /* Define to 1 if `ss_family' is member of `struct sockaddr_storage'. */ -#if (_MSC_VER > 1200) #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 -#endif /* Define to 1 if `ss_len' is member of `struct sockaddr_storage'. */ /* #undef HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN */ @@ -710,17 +687,13 @@ /* #undef USE_PAM */ /* Define to 1 to use software CRC-32C implementation (slicing-by-8). */ -#if (_MSC_VER < 1500) -#define USE_SLICING_BY_8_CRC32C 1 -#endif +/* #undef USE_SLICING_BY_8_CRC32C */ /* Define to 1 use Intel SSE 4.2 CRC instructions. */ /* #undef USE_SSE42_CRC32C */ /* Define to 1 to use Intel SSE 4.2 CRC instructions with a runtime check. */ -#if (_MSC_VER >= 1500) #define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK -#endif /* Define to select SysV-style semaphores. */ /* #undef USE_SYSV_SEMAPHORES */ @@ -758,11 +731,7 @@ /* Define to keyword to use for C99 restrict support, or to nothing if this is not supported */ /* Works for C and C++ in Visual Studio 2008 and upwards */ -#if (_MSC_VER >= 1500) #define pg_restrict __restrict -#else -#define pg_restrict -#endif /* Define to the equivalent of the C99 'restrict' keyword, or to nothing if this is not supported. Do not define if restrict is diff --git a/src/include/port/win32.h b/src/include/port/win32.h index 9f48a58aed..bb2f7540b3 100644 --- a/src/include/port/win32.h +++ b/src/include/port/win32.h @@ -35,7 +35,7 @@ * our errcode() function. Since it's likely to get included by standard * system headers, pre-emptively include it now. */ -#if _MSC_VER >= 1400 || defined(HAVE_CRTDEFS_H) +#if defined(_MSC_VER) || defined(HAVE_CRTDEFS_H) #define errcode __msvc_errcode #include #undef errcode diff --git a/src/include/port/win32_port.h b/src/include/port/win32_port.h index 4b935178e1..c459a2417d 100644 --- a/src/include/port/win32_port.h +++ b/src/include/port/win32_port.h @@ -489,18 +489,6 @@ typedef unsigned short mode_t; #define W_OK 2 #define R_OK 4 -/* - * isinf() and isnan() should per spec be in , but MSVC older than - * 2013 does not have them there. It does have _fpclass() and _isnan(), but - * they're in , so include that here even though it means float.h - * percolates to our whole tree. Recent versions don't require any of this. - */ -#if (_MSC_VER < 1800) -#include -#define isinf(x) ((_fpclass(x) == _FPCLASS_PINF) || (_fpclass(x) == _FPCLASS_NINF)) -#define isnan(x) _isnan(x) -#endif - /* Pulled from Makefile.port in MinGW */ #define DLSUFFIX ".dll" diff --git a/src/include/utils/float.h b/src/include/utils/float.h index 543d00e591..6a4d2bfe09 100644 --- a/src/include/utils/float.h +++ b/src/include/utils/float.h @@ -63,7 +63,7 @@ extern int float8_cmp_internal(float8 a, float8 b); * long lived bug in the Microsoft compilers. * See http://support.microsoft.com/kb/120968/en-us for details */ -#if (_MSC_VER >= 1800) +#ifdef _MSC_VER #pragma warning(disable:4756) #endif static inline float4 @@ -73,7 +73,7 @@ get_float4_infinity(void) /* C99 standard way */ return (float4) INFINITY; #else -#if (_MSC_VER >= 1800) +#ifdef _MSC_VER #pragma warning(default:4756) #endif diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.c b/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.c index b7e8054795..586094c4cb 100644 --- a/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.c +++ b/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.c @@ -25,13 +25,6 @@ #line 8 "nan_test.pgc" -#ifdef WIN32 -#if (_MSC_VER < 1800) -#define isinf(x) ((_fpclass(x) == _FPCLASS_PINF) || (_fpclass(x) == _FPCLASS_NINF)) -#define isnan(x) _isnan(x) -#endif -#endif /* WIN32 */ - int main(void) { @@ -41,54 +34,54 @@ main(void) -#line 21 "nan_test.pgc" +#line 14 "nan_test.pgc" int id , loopcount ; -#line 22 "nan_test.pgc" +#line 15 "nan_test.pgc" double d ; -#line 23 "nan_test.pgc" +#line 16 "nan_test.pgc" numeric * num ; -#line 24 "nan_test.pgc" +#line 17 "nan_test.pgc" char val [ 16 ] ; /* exec sql end declare section */ -#line 25 "nan_test.pgc" +#line 18 "nan_test.pgc" ECPGdebug(1, stderr); /* exec sql whenever sqlerror do sqlprint ( ) ; */ -#line 28 "nan_test.pgc" +#line 21 "nan_test.pgc" { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0); -#line 30 "nan_test.pgc" +#line 23 "nan_test.pgc" if (sqlca.sqlcode < 0) sqlprint ( );} -#line 30 "nan_test.pgc" +#line 23 "nan_test.pgc" { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table nantest1 ( id int4 , d float8 )", ECPGt_EOIT, ECPGt_EORT); -#line 32 "nan_test.pgc" +#line 25 "nan_test.pgc" if (sqlca.sqlcode < 0) sqlprint ( );} -#line 32 "nan_test.pgc" +#line 25 "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 33 "nan_test.pgc" +#line 26 "nan_test.pgc" if (sqlca.sqlcode < 0) sqlprint ( );} -#line 33 "nan_test.pgc" +#line 26 "nan_test.pgc" /* declare cur cursor for select id , d , d from nantest1 */ -#line 35 "nan_test.pgc" +#line 28 "nan_test.pgc" { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare cur cursor for select id , d , d from nantest1", ECPGt_EOIT, ECPGt_EORT); -#line 36 "nan_test.pgc" +#line 29 "nan_test.pgc" if (sqlca.sqlcode < 0) sqlprint ( );} -#line 36 "nan_test.pgc" +#line 29 "nan_test.pgc" for (loopcount = 0; loopcount < 100; loopcount++) { @@ -99,10 +92,10 @@ if (sqlca.sqlcode < 0) sqlprint ( );} ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_char,(val),(long)16,(long)1,(16)*sizeof(char), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT); -#line 39 "nan_test.pgc" +#line 32 "nan_test.pgc" if (sqlca.sqlcode < 0) sqlprint ( );} -#line 39 "nan_test.pgc" +#line 32 "nan_test.pgc" if (sqlca.sqlcode) break; @@ -116,34 +109,34 @@ if (sqlca.sqlcode < 0) sqlprint ( );} ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_double,&(d),(long)1,(long)1,sizeof(double), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT); -#line 47 "nan_test.pgc" +#line 40 "nan_test.pgc" if (sqlca.sqlcode < 0) sqlprint ( );} -#line 47 "nan_test.pgc" +#line 40 "nan_test.pgc" { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into nantest1 ( id , d ) values ( $1 + 6 , $2 )", ECPGt_int,&(id),(long)1,(long)1,sizeof(int), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_char,(val),(long)16,(long)1,(16)*sizeof(char), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT); -#line 48 "nan_test.pgc" +#line 41 "nan_test.pgc" if (sqlca.sqlcode < 0) sqlprint ( );} -#line 48 "nan_test.pgc" +#line 41 "nan_test.pgc" } { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close cur", ECPGt_EOIT, ECPGt_EORT); -#line 50 "nan_test.pgc" +#line 43 "nan_test.pgc" if (sqlca.sqlcode < 0) sqlprint ( );} -#line 50 "nan_test.pgc" +#line 43 "nan_test.pgc" { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare cur cursor for select id , d , d from nantest1", ECPGt_EOIT, ECPGt_EORT); -#line 52 "nan_test.pgc" +#line 45 "nan_test.pgc" if (sqlca.sqlcode < 0) sqlprint ( );} -#line 52 "nan_test.pgc" +#line 45 "nan_test.pgc" for (loopcount = 0; loopcount < 100; loopcount++) { @@ -154,10 +147,10 @@ if (sqlca.sqlcode < 0) sqlprint ( );} ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_char,(val),(long)16,(long)1,(16)*sizeof(char), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT); -#line 55 "nan_test.pgc" +#line 48 "nan_test.pgc" if (sqlca.sqlcode < 0) sqlprint ( );} -#line 55 "nan_test.pgc" +#line 48 "nan_test.pgc" if (sqlca.sqlcode) break; @@ -167,25 +160,25 @@ if (sqlca.sqlcode < 0) sqlprint ( );} printf("%d NaN '%s'\n", id, val); } { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close cur", ECPGt_EOIT, ECPGt_EORT); -#line 63 "nan_test.pgc" +#line 56 "nan_test.pgc" if (sqlca.sqlcode < 0) sqlprint ( );} -#line 63 "nan_test.pgc" +#line 56 "nan_test.pgc" num = PGTYPESnumeric_new(); { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table nantest2 ( id int4 , d numeric )", ECPGt_EOIT, ECPGt_EORT); -#line 67 "nan_test.pgc" +#line 60 "nan_test.pgc" if (sqlca.sqlcode < 0) sqlprint ( );} -#line 67 "nan_test.pgc" +#line 60 "nan_test.pgc" { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into nantest2 ( id , d ) values ( 4 , 'nan' :: numeric )", ECPGt_EOIT, ECPGt_EORT); -#line 68 "nan_test.pgc" +#line 61 "nan_test.pgc" if (sqlca.sqlcode < 0) sqlprint ( );} -#line 68 "nan_test.pgc" +#line 61 "nan_test.pgc" { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select id , d , d from nantest2 where id = 4", ECPGt_EOIT, @@ -195,10 +188,10 @@ if (sqlca.sqlcode < 0) sqlprint ( );} ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_char,(val),(long)16,(long)1,(16)*sizeof(char), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT); -#line 70 "nan_test.pgc" +#line 63 "nan_test.pgc" if (sqlca.sqlcode < 0) sqlprint ( );} -#line 70 "nan_test.pgc" +#line 63 "nan_test.pgc" printf("%d %s '%s'\n", id, (num->sign == NUMERIC_NAN ? "NaN" : "not NaN"), val); @@ -206,28 +199,28 @@ if (sqlca.sqlcode < 0) sqlprint ( );} { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into nantest2 ( id , d ) values ( 5 , $1 )", ECPGt_numeric,&(num),(long)1,(long)0,sizeof(numeric), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT); -#line 74 "nan_test.pgc" +#line 67 "nan_test.pgc" if (sqlca.sqlcode < 0) sqlprint ( );} -#line 74 "nan_test.pgc" +#line 67 "nan_test.pgc" { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into nantest2 ( id , d ) values ( 6 , $1 )", ECPGt_char,(val),(long)16,(long)1,(16)*sizeof(char), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT); -#line 75 "nan_test.pgc" +#line 68 "nan_test.pgc" if (sqlca.sqlcode < 0) sqlprint ( );} -#line 75 "nan_test.pgc" +#line 68 "nan_test.pgc" /* declare cur1 cursor for select id , d , d from nantest2 */ -#line 77 "nan_test.pgc" +#line 70 "nan_test.pgc" { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare cur1 cursor for select id , d , d from nantest2", ECPGt_EOIT, ECPGt_EORT); -#line 78 "nan_test.pgc" +#line 71 "nan_test.pgc" if (sqlca.sqlcode < 0) sqlprint ( );} -#line 78 "nan_test.pgc" +#line 71 "nan_test.pgc" for (loopcount = 0; loopcount < 100; loopcount++) { @@ -238,35 +231,35 @@ if (sqlca.sqlcode < 0) sqlprint ( );} ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_char,(val),(long)16,(long)1,(16)*sizeof(char), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT); -#line 81 "nan_test.pgc" +#line 74 "nan_test.pgc" if (sqlca.sqlcode < 0) sqlprint ( );} -#line 81 "nan_test.pgc" +#line 74 "nan_test.pgc" if (sqlca.sqlcode) break; printf("%d %s '%s'\n", id, (num->sign == NUMERIC_NAN ? "NaN" : "not NaN"), val); } { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close cur1", ECPGt_EOIT, ECPGt_EORT); -#line 86 "nan_test.pgc" +#line 79 "nan_test.pgc" if (sqlca.sqlcode < 0) sqlprint ( );} -#line 86 "nan_test.pgc" +#line 79 "nan_test.pgc" PGTYPESnumeric_free(num); { ECPGtrans(__LINE__, NULL, "rollback"); -#line 90 "nan_test.pgc" +#line 83 "nan_test.pgc" if (sqlca.sqlcode < 0) sqlprint ( );} -#line 90 "nan_test.pgc" +#line 83 "nan_test.pgc" { ECPGdisconnect(__LINE__, "CURRENT"); -#line 91 "nan_test.pgc" +#line 84 "nan_test.pgc" if (sqlca.sqlcode < 0) sqlprint ( );} -#line 91 "nan_test.pgc" +#line 84 "nan_test.pgc" return 0; diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.stderr b/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.stderr index 75a9ffb103..55471e9e41 100644 --- a/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.stderr +++ b/src/interfaces/ecpg/test/expected/pgtypeslib-nan_test.stderr @@ -2,359 +2,359 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database ecpg1_regression on port [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 32: query: create table nantest1 ( id int4 , d float8 ); with 0 parameter(s) on connection ecpg1_regression +[NO_PID]: ecpg_execute on line 25: query: create table nantest1 ( id int4 , d float8 ); with 0 parameter(s) on connection ecpg1_regression +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_execute on line 25: using PQexec +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_process_output on line 25: OK: CREATE TABLE +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_execute on line 26: query: insert into nantest1 ( id , d ) values ( 1 , 'nan' :: float8 ) , ( 2 , 'infinity' :: float8 ) , ( 3 , '-infinity' :: float8 ); with 0 parameter(s) on connection ecpg1_regression +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_execute on line 26: using PQexec +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_process_output on line 26: OK: INSERT 0 3 +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_execute on line 29: query: declare cur cursor for select id , d , d from nantest1; with 0 parameter(s) on connection ecpg1_regression +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_execute on line 29: using PQexec +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_process_output on line 29: OK: DECLARE CURSOR +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_execute on line 32: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 32: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 32: OK: CREATE TABLE +[NO_PID]: ecpg_process_output on line 32: correctly got 1 tuples with 3 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 33: query: insert into nantest1 ( id , d ) values ( 1 , 'nan' :: float8 ) , ( 2 , 'infinity' :: float8 ) , ( 3 , '-infinity' :: float8 ); with 0 parameter(s) on connection ecpg1_regression +[NO_PID]: ecpg_get_data on line 32: RESULT: 1 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 33: using PQexec +[NO_PID]: ecpg_get_data on line 32: RESULT: NaN offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 33: OK: INSERT 0 3 +[NO_PID]: ecpg_get_data on line 32: RESULT: NaN offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 36: query: declare cur cursor for select id , d , d from nantest1; with 0 parameter(s) on connection ecpg1_regression +[NO_PID]: ecpg_execute on line 40: query: insert into nantest1 ( id , d ) values ( $1 + 3 , $2 ); with 2 parameter(s) on connection ecpg1_regression [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 36: using PQexec +[NO_PID]: ecpg_execute on line 40: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 36: OK: DECLARE CURSOR +[NO_PID]: ecpg_free_params on line 40: parameter 1 = 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 39: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression +[NO_PID]: ecpg_free_params on line 40: parameter 2 = NaN [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 39: using PQexec +[NO_PID]: ecpg_process_output on line 40: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 39: correctly got 1 tuples with 3 fields +[NO_PID]: ecpg_execute on line 41: query: insert into nantest1 ( id , d ) values ( $1 + 6 , $2 ); with 2 parameter(s) on connection ecpg1_regression [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 39: RESULT: 1 offset: -1; array: no +[NO_PID]: ecpg_execute on line 41: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 39: RESULT: NaN offset: -1; array: no +[NO_PID]: ecpg_free_params on line 41: parameter 1 = 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 39: RESULT: NaN offset: -1; array: no +[NO_PID]: ecpg_free_params on line 41: parameter 2 = NaN [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 47: query: insert into nantest1 ( id , d ) values ( $1 + 3 , $2 ); with 2 parameter(s) on connection ecpg1_regression +[NO_PID]: ecpg_process_output on line 41: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 47: using PQexecParams +[NO_PID]: ecpg_execute on line 32: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_free_params on line 47: parameter 1 = 1 +[NO_PID]: ecpg_execute on line 32: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_free_params on line 47: parameter 2 = NaN +[NO_PID]: ecpg_process_output on line 32: correctly got 1 tuples with 3 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 47: OK: INSERT 0 1 +[NO_PID]: ecpg_get_data on line 32: RESULT: 2 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 48: query: insert into nantest1 ( id , d ) values ( $1 + 6 , $2 ); with 2 parameter(s) on connection ecpg1_regression +[NO_PID]: ecpg_get_data on line 32: RESULT: Infinity offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 48: using PQexecParams +[NO_PID]: ecpg_get_data on line 32: RESULT: Infinity offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_free_params on line 48: parameter 1 = 1 +[NO_PID]: ecpg_execute on line 40: query: insert into nantest1 ( id , d ) values ( $1 + 3 , $2 ); with 2 parameter(s) on connection ecpg1_regression [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_free_params on line 48: parameter 2 = NaN +[NO_PID]: ecpg_execute on line 40: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 48: OK: INSERT 0 1 +[NO_PID]: ecpg_free_params on line 40: parameter 1 = 2 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 39: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression +[NO_PID]: ecpg_free_params on line 40: parameter 2 = Infinity [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 39: using PQexec +[NO_PID]: ecpg_process_output on line 40: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 39: correctly got 1 tuples with 3 fields +[NO_PID]: ecpg_execute on line 41: query: insert into nantest1 ( id , d ) values ( $1 + 6 , $2 ); with 2 parameter(s) on connection ecpg1_regression [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 39: RESULT: 2 offset: -1; array: no +[NO_PID]: ecpg_execute on line 41: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 39: RESULT: Infinity offset: -1; array: no +[NO_PID]: ecpg_free_params on line 41: parameter 1 = 2 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 39: RESULT: Infinity offset: -1; array: no +[NO_PID]: ecpg_free_params on line 41: parameter 2 = Infinity [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 47: query: insert into nantest1 ( id , d ) values ( $1 + 3 , $2 ); with 2 parameter(s) on connection ecpg1_regression +[NO_PID]: ecpg_process_output on line 41: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 47: using PQexecParams +[NO_PID]: ecpg_execute on line 32: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_free_params on line 47: parameter 1 = 2 +[NO_PID]: ecpg_execute on line 32: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_free_params on line 47: parameter 2 = Infinity +[NO_PID]: ecpg_process_output on line 32: correctly got 1 tuples with 3 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 47: OK: INSERT 0 1 +[NO_PID]: ecpg_get_data on line 32: RESULT: 3 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 48: query: insert into nantest1 ( id , d ) values ( $1 + 6 , $2 ); with 2 parameter(s) on connection ecpg1_regression +[NO_PID]: ecpg_get_data on line 32: RESULT: -Infinity offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 48: using PQexecParams +[NO_PID]: ecpg_get_data on line 32: RESULT: -Infinity offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_free_params on line 48: parameter 1 = 2 +[NO_PID]: ecpg_execute on line 40: query: insert into nantest1 ( id , d ) values ( $1 + 3 , $2 ); with 2 parameter(s) on connection ecpg1_regression [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_free_params on line 48: parameter 2 = Infinity +[NO_PID]: ecpg_execute on line 40: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 48: OK: INSERT 0 1 +[NO_PID]: ecpg_free_params on line 40: parameter 1 = 3 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 39: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression +[NO_PID]: ecpg_free_params on line 40: parameter 2 = -Infinity [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 39: using PQexec +[NO_PID]: ecpg_process_output on line 40: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 39: correctly got 1 tuples with 3 fields +[NO_PID]: ecpg_execute on line 41: query: insert into nantest1 ( id , d ) values ( $1 + 6 , $2 ); with 2 parameter(s) on connection ecpg1_regression [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 39: RESULT: 3 offset: -1; array: no +[NO_PID]: ecpg_execute on line 41: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 39: RESULT: -Infinity offset: -1; array: no +[NO_PID]: ecpg_free_params on line 41: parameter 1 = 3 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 39: RESULT: -Infinity offset: -1; array: no +[NO_PID]: ecpg_free_params on line 41: parameter 2 = -Infinity [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 47: query: insert into nantest1 ( id , d ) values ( $1 + 3 , $2 ); with 2 parameter(s) on connection ecpg1_regression +[NO_PID]: ecpg_process_output on line 41: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 47: using PQexecParams +[NO_PID]: ecpg_execute on line 32: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_free_params on line 47: parameter 1 = 3 +[NO_PID]: ecpg_execute on line 32: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_free_params on line 47: parameter 2 = -Infinity +[NO_PID]: ecpg_process_output on line 32: correctly got 0 tuples with 3 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 47: OK: INSERT 0 1 -[NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 48: query: insert into nantest1 ( id , d ) values ( $1 + 6 , $2 ); with 2 parameter(s) on connection ecpg1_regression -[NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 48: using PQexecParams -[NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_free_params on line 48: parameter 1 = 3 -[NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_free_params on line 48: parameter 2 = -Infinity -[NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 48: OK: INSERT 0 1 -[NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 39: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression -[NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 39: using PQexec -[NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 39: correctly got 0 tuples with 3 fields -[NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: raising sqlcode 100 on line 39: no data found on line 39 +[NO_PID]: raising sqlcode 100 on line 32: no data found on line 32 [NO_PID]: sqlca: code: 100, state: 02000 -[NO_PID]: ecpg_execute on line 50: query: close cur; with 0 parameter(s) on connection ecpg1_regression +[NO_PID]: ecpg_execute on line 43: query: close cur; with 0 parameter(s) on connection ecpg1_regression [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 50: using PQexec +[NO_PID]: ecpg_execute on line 43: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 50: OK: CLOSE CURSOR +[NO_PID]: ecpg_process_output on line 43: OK: CLOSE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 52: query: declare cur cursor for select id , d , d from nantest1; with 0 parameter(s) on connection ecpg1_regression +[NO_PID]: ecpg_execute on line 45: query: declare cur cursor for select id , d , d from nantest1; with 0 parameter(s) on connection ecpg1_regression [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 52: using PQexec +[NO_PID]: ecpg_execute on line 45: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 52: OK: DECLARE CURSOR +[NO_PID]: ecpg_process_output on line 45: OK: DECLARE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 55: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression +[NO_PID]: ecpg_execute on line 48: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 55: using PQexec +[NO_PID]: ecpg_execute on line 48: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 55: correctly got 1 tuples with 3 fields +[NO_PID]: ecpg_process_output on line 48: correctly got 1 tuples with 3 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 55: RESULT: 1 offset: -1; array: no +[NO_PID]: ecpg_get_data on line 48: RESULT: 1 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 55: RESULT: NaN offset: -1; array: no +[NO_PID]: ecpg_get_data on line 48: RESULT: NaN offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 55: RESULT: NaN offset: -1; array: no +[NO_PID]: ecpg_get_data on line 48: RESULT: NaN offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 55: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression +[NO_PID]: ecpg_execute on line 48: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 55: using PQexec +[NO_PID]: ecpg_execute on line 48: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 55: correctly got 1 tuples with 3 fields +[NO_PID]: ecpg_process_output on line 48: correctly got 1 tuples with 3 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 55: RESULT: 2 offset: -1; array: no +[NO_PID]: ecpg_get_data on line 48: RESULT: 2 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 55: RESULT: Infinity offset: -1; array: no +[NO_PID]: ecpg_get_data on line 48: RESULT: Infinity offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 55: RESULT: Infinity offset: -1; array: no +[NO_PID]: ecpg_get_data on line 48: RESULT: Infinity offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 55: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression +[NO_PID]: ecpg_execute on line 48: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 55: using PQexec +[NO_PID]: ecpg_execute on line 48: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 55: correctly got 1 tuples with 3 fields +[NO_PID]: ecpg_process_output on line 48: correctly got 1 tuples with 3 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 55: RESULT: 3 offset: -1; array: no +[NO_PID]: ecpg_get_data on line 48: RESULT: 3 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 55: RESULT: -Infinity offset: -1; array: no +[NO_PID]: ecpg_get_data on line 48: RESULT: -Infinity offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 55: RESULT: -Infinity offset: -1; array: no +[NO_PID]: ecpg_get_data on line 48: RESULT: -Infinity offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 55: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression +[NO_PID]: ecpg_execute on line 48: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 55: using PQexec +[NO_PID]: ecpg_execute on line 48: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 55: correctly got 1 tuples with 3 fields +[NO_PID]: ecpg_process_output on line 48: correctly got 1 tuples with 3 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 55: RESULT: 4 offset: -1; array: no +[NO_PID]: ecpg_get_data on line 48: RESULT: 4 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 55: RESULT: NaN offset: -1; array: no +[NO_PID]: ecpg_get_data on line 48: RESULT: NaN offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 55: RESULT: NaN offset: -1; array: no +[NO_PID]: ecpg_get_data on line 48: RESULT: NaN offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 55: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression +[NO_PID]: ecpg_execute on line 48: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 55: using PQexec +[NO_PID]: ecpg_execute on line 48: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 55: correctly got 1 tuples with 3 fields +[NO_PID]: ecpg_process_output on line 48: correctly got 1 tuples with 3 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 55: RESULT: 7 offset: -1; array: no +[NO_PID]: ecpg_get_data on line 48: RESULT: 7 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 55: RESULT: NaN offset: -1; array: no +[NO_PID]: ecpg_get_data on line 48: RESULT: NaN offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 55: RESULT: NaN offset: -1; array: no +[NO_PID]: ecpg_get_data on line 48: RESULT: NaN offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 55: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression +[NO_PID]: ecpg_execute on line 48: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 55: using PQexec +[NO_PID]: ecpg_execute on line 48: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 55: correctly got 1 tuples with 3 fields +[NO_PID]: ecpg_process_output on line 48: correctly got 1 tuples with 3 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 55: RESULT: 5 offset: -1; array: no +[NO_PID]: ecpg_get_data on line 48: RESULT: 5 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 55: RESULT: Infinity offset: -1; array: no +[NO_PID]: ecpg_get_data on line 48: RESULT: Infinity offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 55: RESULT: Infinity offset: -1; array: no +[NO_PID]: ecpg_get_data on line 48: RESULT: Infinity offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 55: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression +[NO_PID]: ecpg_execute on line 48: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 55: using PQexec +[NO_PID]: ecpg_execute on line 48: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 55: correctly got 1 tuples with 3 fields +[NO_PID]: ecpg_process_output on line 48: correctly got 1 tuples with 3 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 55: RESULT: 8 offset: -1; array: no +[NO_PID]: ecpg_get_data on line 48: RESULT: 8 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 55: RESULT: Infinity offset: -1; array: no +[NO_PID]: ecpg_get_data on line 48: RESULT: Infinity offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 55: RESULT: Infinity offset: -1; array: no +[NO_PID]: ecpg_get_data on line 48: RESULT: Infinity offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 55: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression +[NO_PID]: ecpg_execute on line 48: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 55: using PQexec +[NO_PID]: ecpg_execute on line 48: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 55: correctly got 1 tuples with 3 fields +[NO_PID]: ecpg_process_output on line 48: correctly got 1 tuples with 3 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 55: RESULT: 6 offset: -1; array: no +[NO_PID]: ecpg_get_data on line 48: RESULT: 6 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 55: RESULT: -Infinity offset: -1; array: no +[NO_PID]: ecpg_get_data on line 48: RESULT: -Infinity offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 55: RESULT: -Infinity offset: -1; array: no +[NO_PID]: ecpg_get_data on line 48: RESULT: -Infinity offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 55: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression +[NO_PID]: ecpg_execute on line 48: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 55: using PQexec +[NO_PID]: ecpg_execute on line 48: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 55: correctly got 1 tuples with 3 fields +[NO_PID]: ecpg_process_output on line 48: correctly got 1 tuples with 3 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 55: RESULT: 9 offset: -1; array: no +[NO_PID]: ecpg_get_data on line 48: RESULT: 9 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 55: RESULT: -Infinity offset: -1; array: no +[NO_PID]: ecpg_get_data on line 48: RESULT: -Infinity offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 55: RESULT: -Infinity offset: -1; array: no +[NO_PID]: ecpg_get_data on line 48: RESULT: -Infinity offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 55: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression +[NO_PID]: ecpg_execute on line 48: query: fetch from cur; with 0 parameter(s) on connection ecpg1_regression [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 55: using PQexec +[NO_PID]: ecpg_execute on line 48: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 55: correctly got 0 tuples with 3 fields +[NO_PID]: ecpg_process_output on line 48: correctly got 0 tuples with 3 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: raising sqlcode 100 on line 55: no data found on line 55 +[NO_PID]: raising sqlcode 100 on line 48: no data found on line 48 [NO_PID]: sqlca: code: 100, state: 02000 -[NO_PID]: ecpg_execute on line 63: query: close cur; with 0 parameter(s) on connection ecpg1_regression +[NO_PID]: ecpg_execute on line 56: query: close cur; with 0 parameter(s) on connection ecpg1_regression +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_execute on line 56: using PQexec +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_process_output on line 56: OK: CLOSE CURSOR +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_execute on line 60: query: create table nantest2 ( id int4 , d numeric ); with 0 parameter(s) on connection ecpg1_regression +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_execute on line 60: using PQexec +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_process_output on line 60: OK: CREATE TABLE +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_execute on line 61: query: insert into nantest2 ( id , d ) values ( 4 , 'nan' :: numeric ); with 0 parameter(s) on connection ecpg1_regression +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_execute on line 61: using PQexec +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_process_output on line 61: OK: INSERT 0 1 +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_execute on line 63: query: select id , d , d from nantest2 where id = 4; with 0 parameter(s) on connection ecpg1_regression [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 63: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 63: OK: CLOSE CURSOR +[NO_PID]: ecpg_process_output on line 63: correctly got 1 tuples with 3 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 67: query: create table nantest2 ( id int4 , d numeric ); with 0 parameter(s) on connection ecpg1_regression +[NO_PID]: ecpg_get_data on line 63: RESULT: 4 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 67: using PQexec +[NO_PID]: ecpg_get_data on line 63: RESULT: NaN offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 67: OK: CREATE TABLE +[NO_PID]: ecpg_get_data on line 63: RESULT: NaN offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 68: query: insert into nantest2 ( id , d ) values ( 4 , 'nan' :: numeric ); with 0 parameter(s) on connection ecpg1_regression +[NO_PID]: ecpg_execute on line 67: query: insert into nantest2 ( id , d ) values ( 5 , $1 ); with 1 parameter(s) on connection ecpg1_regression [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 68: using PQexec +[NO_PID]: ecpg_execute on line 67: using PQexecParams +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_free_params on line 67: parameter 1 = NaN +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_process_output on line 67: OK: INSERT 0 1 +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_execute on line 68: query: insert into nantest2 ( id , d ) values ( 6 , $1 ); with 1 parameter(s) on connection ecpg1_regression +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_execute on line 68: using PQexecParams +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_free_params on line 68: parameter 1 = NaN [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_process_output on line 68: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 70: query: select id , d , d from nantest2 where id = 4; with 0 parameter(s) on connection ecpg1_regression +[NO_PID]: ecpg_execute on line 71: query: declare cur1 cursor for select id , d , d from nantest2; with 0 parameter(s) on connection ecpg1_regression [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 70: using PQexec +[NO_PID]: ecpg_execute on line 71: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 70: correctly got 1 tuples with 3 fields +[NO_PID]: ecpg_process_output on line 71: OK: DECLARE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 70: RESULT: 4 offset: -1; array: no +[NO_PID]: ecpg_execute on line 74: query: fetch from cur1; with 0 parameter(s) on connection ecpg1_regression [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 70: RESULT: NaN offset: -1; array: no +[NO_PID]: ecpg_execute on line 74: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 70: RESULT: NaN offset: -1; array: no +[NO_PID]: ecpg_process_output on line 74: correctly got 1 tuples with 3 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 74: query: insert into nantest2 ( id , d ) values ( 5 , $1 ); with 1 parameter(s) on connection ecpg1_regression +[NO_PID]: ecpg_get_data on line 74: RESULT: 4 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 74: using PQexecParams +[NO_PID]: ecpg_get_data on line 74: RESULT: NaN offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_free_params on line 74: parameter 1 = NaN +[NO_PID]: ecpg_get_data on line 74: RESULT: NaN offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 74: OK: INSERT 0 1 +[NO_PID]: ecpg_execute on line 74: query: fetch from cur1; with 0 parameter(s) on connection ecpg1_regression [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 75: query: insert into nantest2 ( id , d ) values ( 6 , $1 ); with 1 parameter(s) on connection ecpg1_regression +[NO_PID]: ecpg_execute on line 74: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 75: using PQexecParams +[NO_PID]: ecpg_process_output on line 74: correctly got 1 tuples with 3 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_free_params on line 75: parameter 1 = NaN +[NO_PID]: ecpg_get_data on line 74: RESULT: 5 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 75: OK: INSERT 0 1 +[NO_PID]: ecpg_get_data on line 74: RESULT: NaN offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 78: query: declare cur1 cursor for select id , d , d from nantest2; with 0 parameter(s) on connection ecpg1_regression +[NO_PID]: ecpg_get_data on line 74: RESULT: NaN offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 78: using PQexec +[NO_PID]: ecpg_execute on line 74: query: fetch from cur1; with 0 parameter(s) on connection ecpg1_regression [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 78: OK: DECLARE CURSOR +[NO_PID]: ecpg_execute on line 74: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 81: query: fetch from cur1; with 0 parameter(s) on connection ecpg1_regression +[NO_PID]: ecpg_process_output on line 74: correctly got 1 tuples with 3 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 81: using PQexec +[NO_PID]: ecpg_get_data on line 74: RESULT: 6 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 81: correctly got 1 tuples with 3 fields +[NO_PID]: ecpg_get_data on line 74: RESULT: NaN offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 81: RESULT: 4 offset: -1; array: no +[NO_PID]: ecpg_get_data on line 74: RESULT: NaN offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 81: RESULT: NaN offset: -1; array: no +[NO_PID]: ecpg_execute on line 74: query: fetch from cur1; with 0 parameter(s) on connection ecpg1_regression [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 81: RESULT: NaN offset: -1; array: no +[NO_PID]: ecpg_execute on line 74: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 81: query: fetch from cur1; with 0 parameter(s) on connection ecpg1_regression +[NO_PID]: ecpg_process_output on line 74: correctly got 0 tuples with 3 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 81: using PQexec -[NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 81: correctly got 1 tuples with 3 fields -[NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 81: RESULT: 5 offset: -1; array: no -[NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 81: RESULT: NaN offset: -1; array: no -[NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 81: RESULT: NaN offset: -1; array: no -[NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 81: query: fetch from cur1; with 0 parameter(s) on connection ecpg1_regression -[NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 81: using PQexec -[NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 81: correctly got 1 tuples with 3 fields -[NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 81: RESULT: 6 offset: -1; array: no -[NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 81: RESULT: NaN offset: -1; array: no -[NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 81: RESULT: NaN offset: -1; array: no -[NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 81: query: fetch from cur1; with 0 parameter(s) on connection ecpg1_regression -[NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 81: using PQexec -[NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 81: correctly got 0 tuples with 3 fields -[NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: raising sqlcode 100 on line 81: no data found on line 81 +[NO_PID]: raising sqlcode 100 on line 74: no data found on line 74 [NO_PID]: sqlca: code: 100, state: 02000 -[NO_PID]: ecpg_execute on line 86: query: close cur1; with 0 parameter(s) on connection ecpg1_regression +[NO_PID]: ecpg_execute on line 79: query: close cur1; with 0 parameter(s) on connection ecpg1_regression [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 86: using PQexec +[NO_PID]: ecpg_execute on line 79: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 86: OK: CLOSE CURSOR +[NO_PID]: ecpg_process_output on line 79: OK: CLOSE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGtrans on line 90: action "rollback"; connection "ecpg1_regression" +[NO_PID]: ECPGtrans on line 83: action "rollback"; connection "ecpg1_regression" [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_finish: connection ecpg1_regression closed [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/pgtypeslib/nan_test.pgc b/src/interfaces/ecpg/test/pgtypeslib/nan_test.pgc index 7df08194e1..04ddbde9f3 100644 --- a/src/interfaces/ecpg/test/pgtypeslib/nan_test.pgc +++ b/src/interfaces/ecpg/test/pgtypeslib/nan_test.pgc @@ -7,13 +7,6 @@ exec sql include ../regression; -#ifdef WIN32 -#if (_MSC_VER < 1800) -#define isinf(x) ((_fpclass(x) == _FPCLASS_PINF) || (_fpclass(x) == _FPCLASS_NINF)) -#define isnan(x) _isnan(x) -#endif -#endif /* WIN32 */ - int main(void) { diff --git a/src/port/chklocale.c b/src/port/chklocale.c index 9b753c85e9..98ff15de2e 100644 --- a/src/port/chklocale.c +++ b/src/port/chklocale.c @@ -212,7 +212,7 @@ win32_langinfo(const char *ctype) { char *r = NULL; -#if (_MSC_VER >= 1700) && (_MSC_VER < 1900) +#if defined(_MSC_VER) && (_MSC_VER < 1900) _locale_t loct = NULL; loct = _create_locale(LC_CTYPE, ctype); @@ -226,7 +226,7 @@ win32_langinfo(const char *ctype) #else char *codepage; -#if (_MSC_VER >= 1900) +#if defined(_MSC_VER) && (_MSC_VER >= 1900) uint32 cp; WCHAR wctype[LOCALE_NAME_MAX_LENGTH]; diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm index 17e5903c28..a6958273ac 100644 --- a/src/tools/msvc/Solution.pm +++ b/src/tools/msvc/Solution.pm @@ -511,10 +511,8 @@ sub GenerateFiles open(my $o, '>', 'src/interfaces/ecpg/include/ecpg_config.h') || confess "Could not open ecpg_config.h"; print $o < 1200) #define HAVE_LONG_LONG_INT 1 #define HAVE_LONG_LONG_INT_64 1 -#endif #define ENABLE_THREAD_SAFETY 1 EOF close($o);