From: Tom Lane Date: Tue, 11 Jan 2005 18:34:41 +0000 (+0000) Subject: interval_out failed to mention 'ago' for negative intervals in SQL and X-Git-Tag: REL7_2_7~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2b47146a0756eba30c2d1d29b298979e3d4c9fb7;p=postgresql 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 61a8b04fb1..8218814072 100644 --- a/src/backend/utils/adt/datetime.c +++ b/src/backend/utils/adt/datetime.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.87.2.3 2003/01/26 22:33:16 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.87.2.4 2005/01/11 18:34:41 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -3448,7 +3448,7 @@ EncodeTimeSpan(struct tm * tm, double 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);