Brent Verner <brent(at)rcfile(dot)org> writes:
> This patch fixes a problem where extract/date_part returns bad values
> for microsecond and millisecond parts.
I'm not convinced the existing behavior is wrong. Timestamps are floats
in PG, and therefore not infinitely precise. Your patch seems to be
trying to cover this up, but I fear it will only succeed in introducing
other problems.
regards, tom lane