aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/compatlib/informix.c
diff options
context:
space:
mode:
authorMichael Meskes <meskes@postgresql.org>2003-10-07 05:46:56 +0000
committerMichael Meskes <meskes@postgresql.org>2003-10-07 05:46:56 +0000
commit3cda9802989b260f02b45f712523db0e16a39ecb (patch)
treeed4dad7a97d4128bdc3f8786785f0bbffb30477e /src/interfaces/ecpg/compatlib/informix.c
parent34e9ab027be6cde28e013741474778503c3e8499 (diff)
downloadpostgresql-3cda9802989b260f02b45f712523db0e16a39ecb.tar.gz
postgresql-3cda9802989b260f02b45f712523db0e16a39ecb.zip
Fixed error handling in Informix compat str to date conversion.
Diffstat (limited to 'src/interfaces/ecpg/compatlib/informix.c')
-rw-r--r--src/interfaces/ecpg/compatlib/informix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/interfaces/ecpg/compatlib/informix.c b/src/interfaces/ecpg/compatlib/informix.c
index 500786cbede..59e4763ccd0 100644
--- a/src/interfaces/ecpg/compatlib/informix.c
+++ b/src/interfaces/ecpg/compatlib/informix.c
@@ -436,7 +436,7 @@ rstrdate(char *str, date * d)
{
date dat = PGTYPESdate_from_asc(str, NULL);
- if (errno != PGTYPES_DATE_BAD_DATE && dat == 0)
+ if (errno && errno != PGTYPES_DATE_BAD_DATE)
return ECPG_INFORMIX_BAD_DATE;
*d = dat;