Fix to_char(), to_date(), and to_timestamp() to handle negative/BC
authorBruce Momjian <bruce@momjian.us>
Tue, 7 Aug 2012 17:34:44 +0000 (13:34 -0400)
committerBruce Momjian <bruce@momjian.us>
Tue, 7 Aug 2012 17:34:44 +0000 (13:34 -0400)
commitac78c4178bec7b252d22a39515ad6efd6c1a7d7e
tree03c163cca94916b05493d248c2f91263dcd857e9
parentfbcfa90bb8ceb77f7763b6ae16bcbb777849ccee
Fix to_char(), to_date(), and to_timestamp() to handle negative/BC
century specifications just like positive/AD centuries.  Previously the
behavior was either wrong or inconsistent with positive/AD handling.

Centuries without years now always assume the first year of the century,
which is now documented.
doc/src/sgml/func.sgml
src/backend/utils/adt/formatting.c
src/test/regress/expected/timestamp.out
src/test/regress/expected/timestamptz.out