git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 772faaf)
Doc: fix bogus to_date() examples.
2024年4月11日 15:09:00 +0000 (11:09 -0400)
2024年4月11日 15:09:00 +0000 (11:09 -0400)
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


diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index b432914dc88f0a7735196f948273be09188e3934..8dfb42ad4db87e6418df8a1a4a6721dbf8ab9b43 100644 (file)
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -8401,11 +8401,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>
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /