Fixed initialization bug and added postgres_fe.h to pgtypeslib.
This commit is contained in:
parent
b837c99210
commit
7b1885bf98
@ -287,7 +287,10 @@ int
|
||||
dectoasc(Decimal *np, char *cp, int len, int right)
|
||||
{
|
||||
char *str;
|
||||
Numeric *nres;
|
||||
Numeric *nres = PGTYPESnumeric_new();
|
||||
|
||||
if (nres == NULL)
|
||||
return -1211;
|
||||
|
||||
if (PGTYPESnumeric_from_decimal(np, nres) != 0)
|
||||
return -1211;
|
||||
|
@ -1,7 +1,4 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include "postgres_fe.h"
|
||||
|
||||
#include "extern.h"
|
||||
|
||||
|
@ -1,10 +1,8 @@
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include "postgres_fe.h"
|
||||
|
||||
#include <time.h>
|
||||
#include <ctype.h>
|
||||
#include <float.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "extern.h"
|
||||
#include "dt.h"
|
||||
|
@ -1,10 +1,7 @@
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include "postgres_fe.h"
|
||||
|
||||
#include <time.h>
|
||||
#include <float.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "extern.h"
|
||||
@ -1057,8 +1054,7 @@ abstime2tm(AbsoluteTime _time, int *tzp, struct tm * tm, char **tzn)
|
||||
*/
|
||||
StrNCpy(*tzn, tm->tm_zone, MAXTZLEN + 1);
|
||||
if (strlen(tm->tm_zone) > MAXTZLEN)
|
||||
elog(WARNING, "Invalid timezone \'%s\'",
|
||||
tm->tm_zone);
|
||||
tm->tm_isdst = -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -1077,8 +1073,7 @@ abstime2tm(AbsoluteTime _time, int *tzp, struct tm * tm, char **tzn)
|
||||
*/
|
||||
StrNCpy(*tzn, tzname[tm->tm_isdst], MAXTZLEN + 1);
|
||||
if (strlen(tzname[tm->tm_isdst]) > MAXTZLEN)
|
||||
elog(WARNING, "Invalid timezone \'%s\'",
|
||||
tzname[tm->tm_isdst]);
|
||||
tm->tm_isdst = -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1,10 +1,6 @@
|
||||
#include <math.h>
|
||||
#include "postgres_fe.h"
|
||||
#include <time.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <float.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
|
||||
#ifdef __FAST_MATH__
|
||||
#error -ffast-math is known to break this code
|
||||
|
@ -1,11 +1,5 @@
|
||||
#include "postgres_fe.h"
|
||||
#include <ctype.h>
|
||||
#include <float.h>
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "extern.h"
|
||||
#include "pgtypes_error.h"
|
||||
|
@ -1,9 +1,7 @@
|
||||
#include <math.h>
|
||||
#include "postgres_fe.h"
|
||||
#include <time.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <float.h>
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
|
||||
#ifdef __FAST_MATH__
|
||||
#error -ffast-math is known to break this code
|
||||
|
Loading…
x
Reference in New Issue
Block a user