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:34:55 +00:00
parent 113fbe1264
commit 9a54b76b39
4 changed files with 51 additions and 48 deletions

View File

@ -1,4 +1,4 @@
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.349 2007/01/12 20:06:10 momjian Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.350 2007/01/12 23:34:54 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 component of year (minimum 2 digits)</entry>
<entry>century (2 digits) (The twenty-first century starts on 2001-01-01.)</entry>
</row>
<row>
<entry><literal>J</literal></entry>