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;
-#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"
*/
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
*/
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