mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-06 15:24:56 +08:00
Add C comment about why we don't spell out "month" in interval values.
This commit is contained in:
parent
446d5d32ae
commit
0711a8b2b3
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user