mirror of
https://github.com/postgres/postgres.git
synced 2025-05-18 17:41:14 +03:00
- Corrected error handling in PGTYPEStimestamp_from_asc.
- Set pgtypeslib version to 1.2.
This commit is contained in:
parent
935e6e502d
commit
bc0476f9c8
@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 1994, Regents of the University of California
|
# 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
|
NAME= pgtypes
|
||||||
SO_MAJOR_VERSION= 1
|
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)
|
override CPPFLAGS := -I$(top_srcdir)/src/interfaces/ecpg/include -I$(top_srcdir)/src/include/utils -I$(libpq_srcdir) $(CPPFLAGS) $(THREAD_CPPFLAGS)
|
||||||
SHLIB_LINK += -lm
|
SHLIB_LINK += -lm
|
||||||
|
@ -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 tm2timestamp(struct tm *, fsec_t, int *, timestamp *);
|
||||||
|
|
||||||
int DecodeUnits(int field, char *lowtoken, int *val);
|
int DecodeUnits(int field, char *lowtoken, int *val);
|
||||||
bool ClearDateCache(bool, bool, bool);
|
|
||||||
|
|
||||||
bool CheckDateTokenTables(void);
|
bool CheckDateTokenTables(void);
|
||||||
|
|
||||||
|
@ -291,7 +291,6 @@ PGTYPEStimestamp_from_asc(char *str, char **endptr)
|
|||||||
char *realptr;
|
char *realptr;
|
||||||
char **ptr = (endptr != NULL) ? endptr : &realptr;
|
char **ptr = (endptr != NULL) ? endptr : &realptr;
|
||||||
|
|
||||||
errno = 0;
|
|
||||||
if (strlen(str) >= sizeof(lowstr))
|
if (strlen(str) >= sizeof(lowstr))
|
||||||
{
|
{
|
||||||
errno = PGTYPES_TS_BAD_TIMESTAMP;
|
errno = PGTYPES_TS_BAD_TIMESTAMP;
|
||||||
@ -338,6 +337,8 @@ PGTYPEStimestamp_from_asc(char *str, char **endptr)
|
|||||||
|
|
||||||
/* AdjustTimestampForTypmod(&result, typmod); */
|
/* AdjustTimestampForTypmod(&result, typmod); */
|
||||||
|
|
||||||
|
/* Since it's difficult to test for noresult, make sure errno is 0 if no error occured. */
|
||||||
|
errno = 0;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user