From: Pavel Pleva <pavel.pleva@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: Potential to_date(string, string) function malfunction
Date: Wed, 9 Oct 2019 16:22:31 +0200
Message-ID: <f0bb351b-6851-8ca7-3976-5bdb72ad96b0@gmail.com> (raw)
In-Reply-To: <22301.1570549124@sss.pgh.pa.us>
References: <05d1d8b7-d1de-1ec7-7652-5b7ff5deaa65@gmail.com>
<22301.1570549124@sss.pgh.pa.us>
Thanks for reply, don't have access to PG v10 so good to know.
Best regards
Pavel Pleva
Dne 08. 10. 19 v 17:38 Tom Lane napsal(a):
> Pavel Pleva <pavel.pleva@gmail.com> writes:
>> I'd like to report you in my opinion weird behaviour of function
>> to_date(string, string). According to specs using format 'YYYY-MM-DD' in
>> months portion it should tolerate 01-12 and in days portion 01-31. But
>> if you try "SELECT to_date('2019-30-50', 'YYYY-MM-DD') instead of
>> throwing error it outputs "2021-07-23".
>> This is output of 'SELECT version();' on our system: "PostgreSQL 9.4.23
>> on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red
>> Hat 4.8.5-36), 64-bit"
> PG v10 and later throw an error for this.
>
> regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: pavel.pleva@gmail.com, tgl@sss.pgh.pa.us
Subject: Re: Potential to_date(string, string) function malfunction
In-Reply-To: <f0bb351b-6851-8ca7-3976-5bdb72ad96b0@gmail.com>
References: <05d1d8b7-d1de-1ec7-7652-5b7ff5deaa65@gmail.com> <22301.1570549124@sss.pgh.pa.us> <f0bb351b-6851-8ca7-3976-5bdb72ad96b0@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox