Removed regression test that triggers those libc precision bugs on some archs.
- 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.
-/* $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
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);
-/* $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"
return NULL;
}
-unsigned int
+int
ECPGDynamicType(Oid type)
{
switch (type)
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");
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");
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
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
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)
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