interval_out failed to mention 'ago' for negative intervals in SQL and
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 11 Jan 2005 18:34:01 +0000 (18:34 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 11 Jan 2005 18:34:01 +0000 (18:34 +0000)
GERMAN datestyles.  Ancient bug reported by Terry Lee Tucker.

src/backend/utils/adt/datetime.c
src/interfaces/ecpg/pgtypeslib/interval.c

index 2e4b50abf209c1614c21b84b39b4b7c98a43a133..d5655d09b52bb1046617bd7b9e56402a094e14cb 100644 (file)
@@ -3907,7 +3907,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);
index e1d34e8a7b20d3591e05706066017351cba680e3..7a06069634c5e9f61afc149ad2a85c82fe3d03a6 100644 (file)
@@ -663,7 +663,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);