From: Tom Lane Date: Tue, 11 Jan 2005 18:34:29 +0000 (+0000) Subject: interval_out failed to mention 'ago' for negative intervals in SQL and X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=1d06c2e7196cd7f749c5b1707c1c23cc62bf7fd4;p=users%2Fbernd%2Fpostgres.git interval_out failed to mention 'ago' for negative intervals in SQL and GERMAN datestyles. Ancient bug reported by Terry Lee Tucker. --- diff --git a/src/backend/utils/adt/datetime.c b/src/backend/utils/adt/datetime.c index d04bc62531..b1dde66994 100644 --- a/src/backend/utils/adt/datetime.c +++ b/src/backend/utils/adt/datetime.c @@ -3642,7 +3642,7 @@ EncodeInterval(struct tm * tm, fsec_t fsec, int style, char *str) cp += strlen(cp); } - if (is_before && (style == USE_POSTGRES_DATES)) + if (is_before && (style != USE_ISO_DATES)) { strcat(cp, " ago"); cp += strlen(cp);