- Corrected error handling in PGTYPEStimestamp_from_asc.
authorMichael Meskes <meskes@postgresql.org>
Tue, 24 Feb 2004 16:09:16 +0000 (16:09 +0000)
committerMichael Meskes <meskes@postgresql.org>
Tue, 24 Feb 2004 16:09:16 +0000 (16:09 +0000)
- Set pgtypeslib version to 1.2.

src/interfaces/ecpg/pgtypeslib/Makefile
src/interfaces/ecpg/pgtypeslib/dt.h
src/interfaces/ecpg/pgtypeslib/timestamp.c

index a118787a4a5bd7f0d88a52d90b554fd1eb66831b..d128098eae3dbe542b963aff8d766cdd25fed554 100644 (file)
@@ -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
index 2cbc58984bdf4918378d9bae0a1bbda1b5260b3d..fa74a23f4ba180738f0c7ce401e4f3387a8a9c5f 100644 (file)
@@ -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);
 
index ee7fa3b4f8198ead5dcd90668e9396de3389234f..19146d03e1037330b06d77e65b785da92bad8498 100644 (file)
@@ -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;
 }