]> granicus.if.org Git - postgresql/commitdiff
- Corrected error handling in PGTYPEStimestamp_from_asc.
authorMichael Meskes <meskes@postgresql.org>
Tue, 24 Feb 2004 16:07:49 +0000 (16:07 +0000)
committerMichael Meskes <meskes@postgresql.org>
Tue, 24 Feb 2004 16:07:49 +0000 (16:07 +0000)
- Set pgtypeslib version to 1.2.

src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/pgtypeslib/Makefile
src/interfaces/ecpg/pgtypeslib/timestamp.c

index c46a8b221f2595a635cb171fc0df8c00ea7f2616..6df0b72f58b5aef7d89cb7a73cb36664bbfc2d1c 100644 (file)
@@ -1746,5 +1746,10 @@ Mon Feb 16 08:17:19 CET 2004
        - Cleaned up parser a little bit. It does not make sense to allow a
          typename to be typedef'ed that cannot be parsed as variable type.
        - Allowed some SQL keywords to be used as C variable names.
+
+Tue Feb 24 16:48:57 CET 2004
+
+       - Corrected error handling in PGTYPEStimestamp_from_asc.
+       - Set pgtypeslib version to 1.2.
        - Set ecpg version to 3.1.1.
 
index d61a9dbea81415dd7e106095e595ede4c0dea666..c64d61998b2445d244262645ab39b2a773ba18d5 100644 (file)
@@ -4,7 +4,7 @@
 #
 # Copyright (c) 1994, Regents of the University of California
 #
-# $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/Makefile,v 1.15 2003/11/30 06:09:46 momjian Exp $
+# $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/Makefile,v 1.16 2004/02/24 16:07:49 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
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;
 }