Re: to_date()/to_timestamp() silently accept month=0 and day=0 - Mailing list pgsql-bugs

From Ayush Tiwari
Subject Re: to_date()/to_timestamp() silently accept month=0 and day=0
Date
Msg-id CAJTYsWU0_CxphN=dfY=DCMO=n2yg4h2wvt8W=wP30zAhxoiK6A@mail.gmail.com
Whole thread
In response to Re: to_date()/to_timestamp() silently accept month=0 and day=0  (Michael Paquier <michael@paquier.xyz>)
Responses Re: to_date()/to_timestamp() silently accept month=0 and day=0
List pgsql-bugs
Hi,


On Mon, 27 Apr 2026 at 04:13, Michael Paquier <michael@paquier.xyz> wrote:
On Fri, Apr 24, 2026 at 05:41:50PM +0200, Peter Eisentraut wrote:
> Complaints from whom?  Oracle rejects these, and PostgreSQL generally also
> rejects these dates/times in other contexts.  I think this should be
> rejected.

From folks who hypothetically rely on the existing zeroed inputs.  :)
Perhaps it's a far-fetched argument, and just to be clear I would not
really object to a change of behavior on HEAD for v20, just to see
where it goes in 2027.

I'll add this to the commitfest, so that we can circle back on this
once v20 development starts.

I think parallely we can commit Daniel's v2 patch, since
that correctly documents what Postgres has right now, and we'll
know what exactly to change if we decide to go the other way.

Regards,
Ayush 

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Interval unit format bug
Next
From: Melanie Plageman
Date:
Subject: Re: BUG #19418: SQL/JSON JSON_VALUE() does not conform to ISO/IEC 9075-2:2023(E) 6.34