1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Fix handling of CC (century) format spec in to_date/to_char. According to

standard convention the 21st century runs from 2001-2100, not 2000-2099,
so make it work like that.  Per bug #2885 from Akio Iwaasa.

Backpatch to 8.2, but no further, since this is really a definitional
change; users of older branches are probably more interested in stability.
This commit is contained in:
Tom Lane
2007-01-12 23:35:04 +00:00
parent c483632d25
commit 65fe39ee0a
4 changed files with 51 additions and 48 deletions

View File

@ -1,4 +1,4 @@
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.347 2006/11/25 00:38:53 momjian Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.347.2.1 2007/01/12 23:35:03 tgl Exp $ -->
<chapter id="functions">
<title>Functions and Operators</title>
@ -4617,7 +4617,7 @@ SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1,3})');
</row>
<row>
<entry><literal>CC</literal></entry>
<entry>century (2 digits)</entry>
<entry>century (2 digits) (The twenty-first century starts on 2001-01-01.)</entry>
</row>
<row>
<entry><literal>J</literal></entry>