1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-03 20:02:46 +03:00

interval_out failed to mention 'ago' for negative intervals in SQL and

GERMAN datestyles.  Ancient bug reported by Terry Lee Tucker.
This commit is contained in:
Tom Lane
2005-01-11 18:34:01 +00:00
parent 715a73427e
commit 0c8b52bf8b
2 changed files with 3 additions and 3 deletions

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.118.2.3 2004/06/13 17:17:48 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.118.2.4 2005/01/11 18:33:59 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -3907,7 +3907,7 @@ EncodeInterval(struct tm * tm, fsec_t fsec, int style, char *str)
cp += strlen(cp); cp += strlen(cp);
} }
if (is_before && (style == USE_POSTGRES_DATES)) if (is_before && (style != USE_ISO_DATES))
{ {
strcat(cp, " ago"); strcat(cp, " ago");
cp += strlen(cp); cp += strlen(cp);

View File

@ -663,7 +663,7 @@ EncodeInterval(struct tm * tm, fsec_t fsec, int style, char *str)
cp += strlen(cp); cp += strlen(cp);
} }
if (is_before && (style == USE_POSTGRES_DATES)) if (is_before && (style != USE_ISO_DATES))
{ {
strcat(cp, " ago"); strcat(cp, " ago");
cp += strlen(cp); cp += strlen(cp);