Re: Proposed changing the definition of decade for date_trunc and extract
От | Robert Haas |
---|---|
Тема | Re: Proposed changing the definition of decade for date_trunc and extract |
Дата | |
Msg-id | CA+TgmobGF46jWm57N7zcGbEMTSLrPPUfoa6_Z=PttOGvaTKyOg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Proposed changing the definition of decade for date_trunc and extract (Gavin Flower <GavinFlower@archidevsys.co.nz>) |
Список | pgsql-hackers |
On Sun, Aug 3, 2014 at 3:29 PM, Gavin Flower <GavinFlower@archidevsys.co.nz> wrote: > So it would probably be a good idea to mention in the relevant > documentation, that there was no Year Zero, and that 1 AD follows directly > after 1 BC. Well, maybe. By and large, the PostgreSQL documentation should confine itself to documenting facts about PostgreSQL rather than, say, facts about date reckoning, except to the extent that PostgreSQL does something different from the universal norms. I mean, we could document the rules for leap years, too, or how many days there are in each month, or that many people who used the Julian calendar considered the first day of the year to be March 25th, but really, those are things that mostly deserve to be mentioned in a treatise on historical calendaring rather than our documentation, unless there is some PostgreSQL-specific treatment that requires expounding on them. On the original patch, like a few others who have spoken, I think changing the current behavior is a bad idea. I certainly respect Mike's desire to get the behavior right, and to set things up in the way that makes sense to him, but if we start changing things like this on the basis of a small number of complaints, we will piss off a lot of users. There are many people out there who have thousands upon thousands of lines of PostgreSQL code that they can't easily audit and change, and the standard for doing things that might break that code in subtle ways is, and should be, high. If what we were doing today was outright wrong, of course I'd be in favor of changing it. But the current behavior isn't at all unreasonable; there are two possible definitions and we picked one. In that kind of situation, backward compatibility concerns carry a great deal of weight. Even if, in a vacuum, more users would have chosen to do it as Mike proposes vs. what we actually picked, we'll make enough people unhappy by changing it now to make it a poor decision for the project. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
В списке pgsql-hackers по дате отправления: