Removed compiler warning due to unneeded unsigned declaration.
Removed regression test that triggers those libc precision bugs on some archs.
This commit is contained in:
parent
167fa70a2e
commit
a5a1506c96
@ -2155,3 +2155,10 @@ We 8. Nov 10:53:42 CET 2006
|
|||||||
- Applied patch by Peter Harris to free auto_mem struct in ECPGconnect.
|
- Applied patch by Peter Harris to free auto_mem struct in ECPGconnect.
|
||||||
- Set ecpg library version to 5.2.
|
- Set ecpg library version to 5.2.
|
||||||
- Set ecpg version to 4.2.1.
|
- 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.
|
||||||
|
@ -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
|
#ifndef _ECPG_LIB_EXTERN_H
|
||||||
#define _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);
|
bool ECPGinit(const struct connection *, const char *, const int);
|
||||||
char *ECPGstrdup(const char *, int);
|
char *ECPGstrdup(const char *, int);
|
||||||
const char *ECPGtype_name(enum ECPGttype);
|
const char *ECPGtype_name(enum ECPGttype);
|
||||||
unsigned int ECPGDynamicType(Oid);
|
int ECPGDynamicType(Oid);
|
||||||
void ECPGfree_auto_mem(void);
|
void ECPGfree_auto_mem(void);
|
||||||
void ECPGclear_auto_mem(void);
|
void ECPGclear_auto_mem(void);
|
||||||
|
|
||||||
|
@ -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
|
#define POSTGRES_ECPG_INTERNAL
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
@ -66,7 +66,7 @@ ECPGtype_name(enum ECPGttype typ)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int
|
int
|
||||||
ECPGDynamicType(Oid type)
|
ECPGDynamicType(Oid type)
|
||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
|
@ -108,9 +108,14 @@ main(void)
|
|||||||
printf("dec[%d,9]: %s (r: %d - cmp: %d)\n", i, buf, r, q);
|
printf("dec[%d,9]: %s (r: %d - cmp: %d)\n", i, buf, r, q);
|
||||||
}
|
}
|
||||||
|
|
||||||
r = dectodbl(dec, &dbl);
|
if (i != 6)
|
||||||
if (r) check_errno();
|
{
|
||||||
printf("dec[%d,10]: %g (r: %d)\n", i, r?0.0:dbl, r);
|
/* 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);
|
PGTYPESdecimal_free(din);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
@ -129,9 +129,14 @@ main(void)
|
|||||||
printf("dec[%d,9]: %s (r: %d - cmp: %d)\n", i, buf, r, q);
|
printf("dec[%d,9]: %s (r: %d - cmp: %d)\n", i, buf, r, q);
|
||||||
}
|
}
|
||||||
|
|
||||||
r = dectodbl(dec, &dbl);
|
if (i != 6)
|
||||||
if (r) check_errno();
|
{
|
||||||
printf("dec[%d,10]: %g (r: %d)\n", i, r?0.0:dbl, r);
|
/* 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);
|
PGTYPESdecimal_free(din);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
@ -69,7 +69,6 @@ dec[6,6]: 0 (r: 0)
|
|||||||
dec[6,7]: 0.00 (r: 0 - cmp: 1)
|
dec[6,7]: 0.00 (r: 0 - cmp: 1)
|
||||||
dec[6,8]: 0 (r: 0)
|
dec[6,8]: 0 (r: 0)
|
||||||
dec[6,9]: 0.00 (r: 0 - cmp: 1)
|
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,1]: r: 0, 0.001
|
||||||
dec[7,2]: r: 0, 0
|
dec[7,2]: r: 0, 0
|
||||||
|
@ -120,9 +120,16 @@ main(void)
|
|||||||
free(text);
|
free(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
r = PGTYPESnumeric_to_double(num, &d);
|
if (i != 6)
|
||||||
if (r) check_errno();
|
{
|
||||||
printf("num[%d,10]: %g (r: %d)\n", i, r?0.0:d, r);
|
/* 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
|
/* do not test double to numeric because
|
||||||
* - extra digits are different on different architectures
|
* - extra digits are different on different architectures
|
||||||
* - PGTYPESnumeric_from_double internally calls PGTYPESnumeric_from_asc anyway
|
* - PGTYPESnumeric_from_double internally calls PGTYPESnumeric_from_asc anyway
|
||||||
|
@ -88,7 +88,6 @@ num[6,6]: 0 (r: 0)
|
|||||||
num[6,7]: 0.00 (r: 0 - cmp: 1)
|
num[6,7]: 0.00 (r: 0 - cmp: 1)
|
||||||
num[6,8]: 0 (r: 0)
|
num[6,8]: 0 (r: 0)
|
||||||
num[6,9]: 0.00 (r: 0 - cmp: 1)
|
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,11]: - (r: 0)
|
||||||
num[6,12]: 0.00 (r: 0 - cmp: 0)
|
num[6,12]: 0.00 (r: 0 - cmp: 0)
|
||||||
|
|
||||||
|
@ -101,9 +101,16 @@ main(void)
|
|||||||
free(text);
|
free(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
r = PGTYPESnumeric_to_double(num, &d);
|
if (i != 6)
|
||||||
if (r) check_errno();
|
{
|
||||||
printf("num[%d,10]: %g (r: %d)\n", i, r?0.0:d, r);
|
/* 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
|
/* do not test double to numeric because
|
||||||
* - extra digits are different on different architectures
|
* - extra digits are different on different architectures
|
||||||
* - PGTYPESnumeric_from_double internally calls PGTYPESnumeric_from_asc anyway
|
* - PGTYPESnumeric_from_double internally calls PGTYPESnumeric_from_asc anyway
|
||||||
|
Loading…
x
Reference in New Issue
Block a user