aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2024-04-11 11:09:00 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2024-04-11 11:09:27 -0400
commit164c945c38648a64e9f4778df0a6900625085d3c (patch)
tree94a05c7debac6da34e3fbb177bb40a4f630410f4
parent01b01a77fe786740ec5e657e5f2ed0a94ab0ac17 (diff)
downloadpostgresql-164c945c38648a64e9f4778df0a6900625085d3c.tar.gz
postgresql-164c945c38648a64e9f4778df0a6900625085d3c.zip
Doc: fix bogus to_date() examples.
November doesn't have 31 days. Remarkably, this thinko has escaped detection since commit 3f1998727. Noted by Y. Saburov. Discussion: https://postgr.es/m/171276122213.681.531905738590773705@wrigleys.postgresql.org
-rw-r--r--doc/src/sgml/func.sgml6
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 330a31c7549..10dd7958840 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -7679,11 +7679,11 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}');
use some non-digit character or template after <literal>YYYY</literal>,
otherwise the year is always interpreted as 4 digits. For example
(with the year 20000):
- <literal>to_date('200001131', 'YYYYMMDD')</literal> will be
+ <literal>to_date('200001130', 'YYYYMMDD')</literal> will be
interpreted as a 4-digit year; instead use a non-digit
separator after the year, like
- <literal>to_date('20000-1131', 'YYYY-MMDD')</literal> or
- <literal>to_date('20000Nov31', 'YYYYMonDD')</literal>.
+ <literal>to_date('20000-1130', 'YYYY-MMDD')</literal> or
+ <literal>to_date('20000Nov30', 'YYYYMonDD')</literal>.
</para>
</listitem>