From: | tgl(at)postgresql(dot)org (Tom Lane) |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Clean up the code for to_timestamp's conversion of year plus ISO |
Date: | 2009-03-15 20:31:20 |
Message-ID: | 20090315203120.2239D754ADE@cvs.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Log Message:
-----------
Clean up the code for to_timestamp's conversion of year plus ISO day number
to date, as per bug #4702 and subsequent discussion. In particular, make it
work for years specified using AD/BC or CC fields, and fix the test for "no
year specified" so that it doesn't trigger inappropriately for 1 BC (which it
was doing even in code paths that had nothing to do with to_timestamp). I
also did some minor code beautification in the non-ISO-day-number code path.
This area has been busted all along, but because the code has been rewritten
repeatedly, it would be considerable trouble to back-patch. It's such a
corner case that it doesn't seem worth the effort.
Modified Files:
--------------
pgsql/src/backend/utils/adt:
formatting.c (r1.155 -> r1.156)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/formatting.c?r1=1.155&r2=1.156)
timestamp.c (r1.196 -> r1.197)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/timestamp.c?r1=1.196&r2=1.197)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-03-15 22:05:17 | pgsql: Fix contrib/hstore to throw an error for keys or values that |
Previous Message | User Andrewsn | 2009-03-15 16:54:42 | uuid-freebsd - uuid-freebsd: for v1mc, randomize the clock sequence bits |