| From: | "Dann Corbit" <DCorbit(at)connx(dot)com> |
|---|---|
| To: | <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Current code for function j2date does not have the same correct dynamic range as older code. |
| Date: | 2007-12-12 21:14:49 |
| Message-ID: | D425483C2C5C9F49B5B7A41F8944154701000B22@postal.corporate.connx.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
From: Dann Corbit
Sent: Tuesday, December 11, 2007 5:58 PM
To: pgsql-hackers(at)postgresql(dot)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]
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Simon Riggs | 2007-12-12 22:28:58 | Recreating archive_status |
| Previous Message | Joshua D. Drake | 2007-12-12 20:50:16 | Re: VLDB Features |