Re: to_date()/to_timestamp() silently accept month=0 and day=0

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Ayush Tiwari <ayushtiwari(dot)slg01(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Daniel Gustafsson <daniel(at)yesql(dot)se>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: to_date()/to_timestamp() silently accept month=0 and day=0
Date: 2026-04-23 22:14:18
Message-ID: aeqZukF8X29eWtqy@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Apr 23, 2026 at 10:06:41PM +0530, Ayush Tiwari wrote:
> If we are not going to change the behaviour, imo, we should
> atleast add a test case to depict this scenario and comment
> that says this is expected behaviour according to the community.

Yes, we could close the gap with some tests, at least.
--
Michael

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message elodie 2026-04-24 02:02:15 Re: Chinese translations not applied correctly on PostgreSQL 18 Windows
Previous Message Tom Lane 2026-04-23 21:42:43 Re: pg_dumpall bug exit code 0 with fatal