From: Dann Corbit Sent: Tuesday, December 11, 2007 5:58 PM To: pgsql-hackers@postgresql.org Subject: Current code for function j2date does not have the same correct dynamic range as older code. > It may not matter to the PostgreSQL group, since nothing goes > wrong until the year is 1,465,002 or larger. It may also be > an artifact of the Microsoft Visual C++ compiler. At any > rate, the modular math to compute the year month and day do > not remain accurate nearly as long for the new code as the > old. The old code here is j2dateOld(), and the new code is > j2dateNew3(). I made a few tests with other internal types to > try to extend the range of the new code, but neither long long > or using mostly unsigned seems to restore the old range > because the mathematics are not identical. At any rate, here > is a unit test driver you can fiddle with, if you so choose.
Correction: It is the new routines that are sound. The old routines had overflow problems. So *cough* nevermind. [snip of code] ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend