Add C comment about why we don't spell out "month" in interval values.
authorBruce Momjian <bruce@momjian.us>
Wed, 25 May 2011 03:24:44 +0000 (23:24 -0400)
committerBruce Momjian <bruce@momjian.us>
Wed, 25 May 2011 03:55:27 +0000 (23:55 -0400)
src/backend/utils/adt/datetime.c

index 0a12a9b2e175a2acd7d13d0c877ed4ce2b533dc0..0289dbdf02fcb2e71024d8dbe5d6caf5a3901f4f 100644 (file)
@@ -4049,6 +4049,11 @@ EncodeInterval(struct pg_tm * tm, fsec_t fsec, int style, char *str)
            /* Compatible with postgresql < 8.4 when DateStyle = 'iso' */
        case INTSTYLE_POSTGRES:
            cp = AddPostgresIntPart(cp, year, "year", &is_zero, &is_before);
+           /*
+            *  Ideally we should spell out "month" like we do for "year"
+            *  and "day".  However, for backward compatibility, we can't
+            *  easily fix this.  bjm 2011-05-24
+            */
            cp = AddPostgresIntPart(cp, mon, "mon", &is_zero, &is_before);
            cp = AddPostgresIntPart(cp, mday, "day", &is_zero, &is_before);
            if (is_zero || hour != 0 || min != 0 || sec != 0 || fsec != 0)