git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 167fa70)
Removed compiler warning due to unneeded unsigned declaration.
2007年1月25日 16:45:25 +0000 (16:45 +0000)
2007年1月25日 16:45:25 +0000 (16:45 +0000)
Removed regression test that triggers those libc precision bugs on some archs.


diff --git a/src/interfaces/ecpg/ChangeLog b/src/interfaces/ecpg/ChangeLog
index 95605f475fd0bd8788c5173c20747d0d497798fb..7a2ca2470021ec975d34aaf16dddbafc604da37f 100644 (file)
--- a/src/interfaces/ecpg/ChangeLog
+++ b/src/interfaces/ecpg/ChangeLog
@@ -2155,3 +2155,10 @@ We 8. Nov 10:53:42 CET 2006
- Applied patch by Peter Harris to free auto_mem struct in ECPGconnect.
- Set ecpg library version to 5.2.
- Set ecpg version to 4.2.1.
+
+Th 25. Jan 17:17:01 CET 2007
+
+ - Removed compiler warning due to unneeded unsigned declaration.
+ - Removed regression test that triggers those libc precision bugs on some archs.
+ - Set ecpg library version to 5.3.
+ - Set ecpg version to 4.3.1.
diff --git a/src/interfaces/ecpg/ecpglib/extern.h b/src/interfaces/ecpg/ecpglib/extern.h
index d5d44a79c0ce73f76486979e30ffb78b7a412da4..45a182a0d46eb5fc723fccc96fb01e46ac352102 100644 (file)
--- a/src/interfaces/ecpg/ecpglib/extern.h
+++ b/src/interfaces/ecpg/ecpglib/extern.h
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/extern.h,v 1.21 2007年01月12日 10:00:13 meskes Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/extern.h,v 1.22 2007年01月25日 16:45:25 meskes Exp $ */
#ifndef _ECPG_LIB_EXTERN_H
#define _ECPG_LIB_EXTERN_H
@@ -40,7 +40,7 @@ void ECPGfree(void *);
bool ECPGinit(const struct connection *, const char *, const int);
char *ECPGstrdup(const char *, int);
const char *ECPGtype_name(enum ECPGttype);
-unsigned int ECPGDynamicType(Oid);
+int ECPGDynamicType(Oid);
void ECPGfree_auto_mem(void);
void ECPGclear_auto_mem(void);
diff --git a/src/interfaces/ecpg/ecpglib/typename.c b/src/interfaces/ecpg/ecpglib/typename.c
index ebd40fece941dc4eaa38c120956e17f5ff60bdc3..d83356e39df25a3102ebb8026c6c659817bed4d0 100644 (file)
--- a/src/interfaces/ecpg/ecpglib/typename.c
+++ b/src/interfaces/ecpg/ecpglib/typename.c
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/typename.c,v 1.10 2003年11月29日 19:52:08 pgsql Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/typename.c,v 1.11 2007年01月25日 16:45:25 meskes Exp $ */
#define POSTGRES_ECPG_INTERNAL
#include "postgres_fe.h"
@@ -66,7 +66,7 @@ ECPGtype_name(enum ECPGttype typ)
return NULL;
}
-unsigned int
+int
ECPGDynamicType(Oid type)
{
switch (type)
diff --git a/src/interfaces/ecpg/test/compat_informix/dec_test.pgc b/src/interfaces/ecpg/test/compat_informix/dec_test.pgc
index 31f365d2e36579fdfb8d2d860b8e52ff5eccb50b..02e48b56ce6afc596ad5ed8fb64412a0194866ed 100644 (file)
--- a/src/interfaces/ecpg/test/compat_informix/dec_test.pgc
+++ b/src/interfaces/ecpg/test/compat_informix/dec_test.pgc
@@ -108,9 +108,14 @@ main(void)
printf("dec[%d,9]: %s (r: %d - cmp: %d)\n", i, buf, r, q);
}
- r = dectodbl(dec, &dbl);
- if (r) check_errno();
- printf("dec[%d,10]: %g (r: %d)\n", i, r?0.0:dbl, r);
+ if (i != 6)
+ {
+ /* underflow does not work reliable on several archs, so not testing it here */
+ /* this is a libc problem since we only call strtod() */
+ r = dectodbl(dec, &dbl);
+ if (r) check_errno();
+ printf("dec[%d,10]: %g (r: %d)\n", i, r?0.0:dbl, r);
+ }
PGTYPESdecimal_free(din);
printf("\n");
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-dec_test.c b/src/interfaces/ecpg/test/expected/compat_informix-dec_test.c
index d71be24e4e9f241f880dc5eaaaa30d555b16238b..35cd43282001e178453c064fc824d912b87f43b9 100644 (file)
--- a/src/interfaces/ecpg/test/expected/compat_informix-dec_test.c
+++ b/src/interfaces/ecpg/test/expected/compat_informix-dec_test.c
@@ -129,9 +129,14 @@ main(void)
printf("dec[%d,9]: %s (r: %d - cmp: %d)\n", i, buf, r, q);
}
- r = dectodbl(dec, &dbl);
- if (r) check_errno();
- printf("dec[%d,10]: %g (r: %d)\n", i, r?0.0:dbl, r);
+ if (i != 6)
+ {
+ /* underflow does not work reliable on several archs, so not testing it here */
+ /* this is a libc problem since we only call strtod() */
+ r = dectodbl(dec, &dbl);
+ if (r) check_errno();
+ printf("dec[%d,10]: %g (r: %d)\n", i, r?0.0:dbl, r);
+ }
PGTYPESdecimal_free(din);
printf("\n");
diff --git a/src/interfaces/ecpg/test/expected/compat_informix-dec_test.stdout b/src/interfaces/ecpg/test/expected/compat_informix-dec_test.stdout
index 1b523785380311dee2560fd01850f1d185d9c322..1f8675b3f3c3be920a0abd9c46332c4f9e7ef95f 100644 (file)
--- a/src/interfaces/ecpg/test/expected/compat_informix-dec_test.stdout
+++ b/src/interfaces/ecpg/test/expected/compat_informix-dec_test.stdout
@@ -69,7 +69,6 @@ dec[6,6]: 0 (r: 0)
dec[6,7]: 0.00 (r: 0 - cmp: 1)
dec[6,8]: 0 (r: 0)
dec[6,9]: 0.00 (r: 0 - cmp: 1)
-(errno == PGTYPES_NUM_UNDERFLOW) - dec[6,10]: 0 (r: -1)
dec[7,1]: r: 0, 0.001
dec[7,2]: r: 0, 0
diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.c b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.c
index 9b6bada22a1a3e547df69cd0b513a1eac1e4a1c7..444779e811591241d55f607f7faf2296ac173e3c 100644 (file)
--- a/src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.c
+++ b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.c
@@ -120,9 +120,16 @@ main(void)
free(text);
}
- r = PGTYPESnumeric_to_double(num, &d);
- if (r) check_errno();
- printf("num[%d,10]: %g (r: %d)\n", i, r?0.0:d, r);
+ if (i != 6)
+ {
+ /* underflow does not work reliable on several archs, so not testing it here */
+ /* this is a libc problem since we only call strtod() */
+
+ r = PGTYPESnumeric_to_double(num, &d);
+ if (r) check_errno();
+ printf("num[%d,10]: %g (r: %d)\n", i, r?0.0:d, r);
+ }
+
/* do not test double to numeric because
* - extra digits are different on different architectures
* - PGTYPESnumeric_from_double internally calls PGTYPESnumeric_from_asc anyway
diff --git a/src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.stdout b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.stdout
index 6c93632ca3eb9d85aac71719c58a5bb54d3543ea..51a74594eae81de2ec78918eca3591ee793e2a61 100644 (file)
--- a/src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.stdout
+++ b/src/interfaces/ecpg/test/expected/pgtypeslib-num_test2.stdout
@@ -88,7 +88,6 @@ num[6,6]: 0 (r: 0)
num[6,7]: 0.00 (r: 0 - cmp: 1)
num[6,8]: 0 (r: 0)
num[6,9]: 0.00 (r: 0 - cmp: 1)
-(errno == PGTYPES_NUM_UNDERFLOW) - num[6,10]: 0 (r: -1)
num[6,11]: - (r: 0)
num[6,12]: 0.00 (r: 0 - cmp: 0)
diff --git a/src/interfaces/ecpg/test/pgtypeslib/num_test2.pgc b/src/interfaces/ecpg/test/pgtypeslib/num_test2.pgc
index 5a884f1040706bf9c65bff1e6256fb868c0e3909..0b2a2e654ca60917d1376550678e9b4711c98491 100644 (file)
--- a/src/interfaces/ecpg/test/pgtypeslib/num_test2.pgc
+++ b/src/interfaces/ecpg/test/pgtypeslib/num_test2.pgc
@@ -101,9 +101,16 @@ main(void)
free(text);
}
- r = PGTYPESnumeric_to_double(num, &d);
- if (r) check_errno();
- printf("num[%d,10]: %g (r: %d)\n", i, r?0.0:d, r);
+ if (i != 6)
+ {
+ /* underflow does not work reliable on several archs, so not testing it here */
+ /* this is a libc problem since we only call strtod() */
+
+ r = PGTYPESnumeric_to_double(num, &d);
+ if (r) check_errno();
+ printf("num[%d,10]: %g (r: %d)\n", i, r?0.0:d, r);
+ }
+
/* do not test double to numeric because
* - extra digits are different on different architectures
* - PGTYPESnumeric_from_double internally calls PGTYPESnumeric_from_asc anyway
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /