TO_DATE Function unintended behavior when month value is greater than 12

From: naidu rongali <rongalinaidu(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: TO_DATE Function unintended behavior when month value is greater than 12
Date: 2018-03-01 18:34:06
Message-ID: CACu6o4qMF7K-w0-2nNQxZ6zpi6sBrvVo0AMjcq7cX40yeK4nRA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,
I noticed this behavior on recent release of PG database. It will be
helpful to users, if this behavior is looked into.

When executed below SQL, got unintended output when i expected it to throw
error " not a valid month "

SQL executed:
select to_date('20171231','YYYYDDMM')

result:
2019-07-17

Thank you, Naidu

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Pavel Stehule 2018-03-01 19:26:36 Re: TO_DATE Function unintended behavior when month value is greater than 12
Previous Message Greg Clough 2018-03-01 11:13:03 RE: BUG #15067: Documentation or behaviour bug with autovacuum thresholds?