aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meskes <meskes@postgresql.org>2004-02-24 16:09:16 +0000
committerMichael Meskes <meskes@postgresql.org>2004-02-24 16:09:16 +0000
commitbc0476f9c872f1590d80f96d3becf89e5ac0e134 (patch)
treea259bc13273f03d04f9f9bca53e3d30abcdd1eae
parent935e6e502dc8525c3449870458b1a5994c62f350 (diff)
downloadpostgresql-bc0476f9c872f1590d80f96d3becf89e5ac0e134.tar.gz
postgresql-bc0476f9c872f1590d80f96d3becf89e5ac0e134.zip
- Corrected error handling in PGTYPEStimestamp_from_asc.
- Set pgtypeslib version to 1.2.
-rw-r--r--src/interfaces/ecpg/pgtypeslib/Makefile4
-rw-r--r--src/interfaces/ecpg/pgtypeslib/dt.h1
-rw-r--r--src/interfaces/ecpg/pgtypeslib/timestamp.c3
3 files changed, 4 insertions, 4 deletions
diff --git a/src/interfaces/ecpg/pgtypeslib/Makefile b/src/interfaces/ecpg/pgtypeslib/Makefile
index cead1b4843e..cd7326a5fc6 100644
--- a/src/interfaces/ecpg/pgtypeslib/Makefile
+++ b/src/interfaces/ecpg/pgtypeslib/Makefile
@@ -4,7 +4,7 @@
#
# Copyright (c) 1994, Regents of the University of California
#
-# $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/Makefile,v 1.13.2.1 2003/12/17 15:31:51 meskes Exp $
+# $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/Makefile,v 1.13.2.2 2004/02/24 16:09:16 meskes Exp $
#
#-------------------------------------------------------------------------
@@ -14,7 +14,7 @@ include $(top_builddir)/src/Makefile.global
NAME= pgtypes
SO_MAJOR_VERSION= 1
-SO_MINOR_VERSION= 1
+SO_MINOR_VERSION= 2
override CPPFLAGS := -I$(top_srcdir)/src/interfaces/ecpg/include -I$(top_srcdir)/src/include/utils -I$(libpq_srcdir) $(CPPFLAGS) $(THREAD_CPPFLAGS)
SHLIB_LINK += -lm
diff --git a/src/interfaces/ecpg/pgtypeslib/dt.h b/src/interfaces/ecpg/pgtypeslib/dt.h
index 2cbc58984bd..fa74a23f4ba 100644
--- a/src/interfaces/ecpg/pgtypeslib/dt.h
+++ b/src/interfaces/ecpg/pgtypeslib/dt.h
@@ -298,7 +298,6 @@ int EncodeInterval(struct tm * tm, fsec_t fsec, int style, char *str);
int tm2timestamp(struct tm *, fsec_t, int *, timestamp *);
int DecodeUnits(int field, char *lowtoken, int *val);
-bool ClearDateCache(bool, bool, bool);
bool CheckDateTokenTables(void);
diff --git a/src/interfaces/ecpg/pgtypeslib/timestamp.c b/src/interfaces/ecpg/pgtypeslib/timestamp.c
index ee7fa3b4f81..19146d03e10 100644
--- a/src/interfaces/ecpg/pgtypeslib/timestamp.c
+++ b/src/interfaces/ecpg/pgtypeslib/timestamp.c
@@ -291,7 +291,6 @@ PGTYPEStimestamp_from_asc(char *str, char **endptr)
char *realptr;
char **ptr = (endptr != NULL) ? endptr : &realptr;
- errno = 0;
if (strlen(str) >= sizeof(lowstr))
{
errno = PGTYPES_TS_BAD_TIMESTAMP;
@@ -338,6 +337,8 @@ PGTYPEStimestamp_from_asc(char *str, char **endptr)
/* AdjustTimestampForTypmod(&result, typmod); */
+ /* Since it's difficult to test for noresult, make sure errno is 0 if no error occured. */
+ errno = 0;
return result;
}