public inbox for [email protected]  
help / color / mirror / Atom feed
From: Ayush Tiwari <[email protected]>
To: Daniel Gustafsson <[email protected]>
Cc: Michael Paquier <[email protected]>
Cc: [email protected]
Subject: Re: to_date()/to_timestamp() silently accept month=0 and day=0
Date: Thu, 23 Apr 2026 13:56:01 +0530
Message-ID: <CAJTYsWVf7wPE9YWL5Bf310KzWPJiQ9JiW8rT_wtjSiLtAzBCGg@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CAJTYsWWNfF+hMpbsTDF8NMr+AuqoDfNxR=oHUZm7xqGP+dJ9rA@mail.gmail.com>
	<[email protected]>
	<[email protected]>

Hi,

On Thu, 23 Apr 2026 at 13:41, Daniel Gustafsson <[email protected]> wrote:

> > On 23 Apr 2026, at 09:57, Michael Paquier <[email protected]> wrote:
>
> > Perhaps we could consider strengthening such inputs on HEAD once v20
> > opens for business?  It would be really a scary thing to backpatch,
> > still a major release is a different thing.
>
> This could definitely not be backpatched IMO, a quick check in v14 shows
> the
> same behaviour.  The gregorian calendar goes from BC1 to AD1 and does not
> define a year 0, to_date('0000','YYYY') correctly returns year 0001,
> handling
> months/days in the same way at least makes it consistent (though I didn't
> scour
> the archives to see if it was intentionally done like that).
>
>
++ on not backporting it since it may break existing applications.

 But we should consider strengthening such inputs for v20.

Regards,
Ayush


reply

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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: to_date()/to_timestamp() silently accept month=0 and day=0
  In-Reply-To: <CAJTYsWVf7wPE9YWL5Bf310KzWPJiQ9JiW8rT_wtjSiLtAzBCGg@mail.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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox