Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 0711a8b

Browse files
committed
Add C comment about why we don't spell out "month" in interval values.
1 parent 446d5d3 commit 0711a8b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/backend/utils/adt/datetime.c

+5
Original file line numberDiff line numberDiff line change
@@ -4049,6 +4049,11 @@ EncodeInterval(struct pg_tm * tm, fsec_t fsec, int style, char *str)
40494049
/* Compatible with postgresql < 8.4 when DateStyle = 'iso' */
40504050
case INTSTYLE_POSTGRES:
40514051
cp = AddPostgresIntPart(cp, year, "year", &is_zero, &is_before);
4052+
/*
4053+
* Ideally we should spell out "month" like we do for "year"
4054+
* and "day". However, for backward compatibility, we can't
4055+
* easily fix this. bjm 2011-05-24
4056+
*/
40524057
cp = AddPostgresIntPart(cp, mon, "mon", &is_zero, &is_before);
40534058
cp = AddPostgresIntPart(cp, mday, "day", &is_zero, &is_before);
40544059
if (is_zero || hour != 0 || min != 0 || sec != 0 || fsec != 0)

0 commit comments

Comments
 (0)