aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2011-05-24 23:24:44 -0400
committerBruce Momjian <bruce@momjian.us>2011-05-24 23:55:27 -0400
commit0711a8b2b340ee0b0a7fd7ea2ac0fa6aee4708ae (patch)
treeb1b743cca853e410bf1590cdec9bcf47b28e44e8
parent446d5d32aedcca378578c8fe1c2eed34df92a238 (diff)
downloadpostgresql-0711a8b2b340ee0b0a7fd7ea2ac0fa6aee4708ae.tar.gz
postgresql-0711a8b2b340ee0b0a7fd7ea2ac0fa6aee4708ae.zip
Add C comment about why we don't spell out "month" in interval values.
-rw-r--r--src/backend/utils/adt/datetime.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/backend/utils/adt/datetime.c b/src/backend/utils/adt/datetime.c
index 0a12a9b2e17..0289dbdf02f 100644
--- a/src/backend/utils/adt/datetime.c
+++ b/src/backend/utils/adt/datetime.c
@@ -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)