From: | tgl(at)postgresql(dot)org (Tom Lane) |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Use floor() not rint() when reducing precision of fractional |
Date: | 2009-07-06 20:29:23 |
Message-ID: | 20090706202923.9324575331E@cvs.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Log Message:
-----------
Use floor() not rint() when reducing precision of fractional seconds in
timestamp_trunc, timestamptz_trunc, and interval_trunc(). This change
only affects the float-datetime case; the integer-datetime case already
behaved like truncation instead of rounding. Per gripe from Mario Splivalo.
This is a pre-existing issue but I'm choosing not to backpatch, because
it's such a corner case and there have not been prior complaints. The
issue is largely moot anyway given the trend towards integer datetimes.
Modified Files:
--------------
pgsql/src/backend/utils/adt:
timestamp.c (r1.201 -> r1.202)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/timestamp.c?r1=1.201&r2=1.202)
From | Date | Subject | |
---|---|---|---|
Next Message | User Jbcooley | 2009-07-07 01:45:54 | npgsql - Npgsql2: Share NumberFormatInfo between regular value |
Previous Message | Heikki Linnakangas | 2009-07-06 19:12:12 | pgsql: Fix ancient bug in handling of to_char modifier 'TH', when used |