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

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

Hi,

On Fri, 24 Apr 2026 at 13:42, Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:

> > On 24 Apr 2026, at 00:14, Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> >
> > 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.
>
> +1. Do you want to work on this Ayush?
>

Yes, I'll send a patch with test case today.

Regards,
Ayush

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Oleg Gurev 2026-04-24 08:38:14 [BUG] Windows Server 2019 build fail
Previous Message Daniel Gustafsson 2026-04-24 08:12:31 Re: to_date()/to_timestamp() silently accept month=0 and day=0