From: Tom Lane Date: Wed, 17 Dec 2003 21:45:51 +0000 (+0000) Subject: Fix DecodeInterval to handle '-0.1' sanely, per gripe from Tilo Schwarz. X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=1efdb12a6bcc609e48d9796aeefae568e22fb770;p=users%2Fbernd%2Fpostgres.git Fix DecodeInterval to handle '-0.1' sanely, per gripe from Tilo Schwarz. --- diff --git a/src/backend/utils/adt/datetime.c b/src/backend/utils/adt/datetime.c index 823c5cc775..3d54883b26 100644 --- a/src/backend/utils/adt/datetime.c +++ b/src/backend/utils/adt/datetime.c @@ -3005,7 +3005,7 @@ DecodeInterval(char **field, int *ftype, int nf, int *dtype, struct tm * tm, fse if (*cp != '\0') return DTERR_BAD_FORMAT; - if (val < 0) + if (*field[i] == '-') fval = -(fval); } else if (*cp == '\0')