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

Lines changed: 5 additions & 0 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy