Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wGBeZ-005yK7-0g for pgsql-bugs@arkaria.postgresql.org; Fri, 24 Apr 2026 08:12:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wGBeY-005PaH-0q for pgsql-bugs@arkaria.postgresql.org; Fri, 24 Apr 2026 08:12:46 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wGBeY-005Pa9-02 for pgsql-bugs@lists.postgresql.org; Fri, 24 Apr 2026 08:12:46 +0000 Received: from smtp.outgoing.loopia.se ([93.188.3.37]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wGBeV-00000002Xyj-0CZQ for pgsql-bugs@lists.postgresql.org; Fri, 24 Apr 2026 08:12:45 +0000 Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id 09D9558576D for ; Fri, 24 Apr 2026 10:12:42 +0200 (CEST) Received: from s979.loopia.se (unknown [172.22.191.5]) by s807.loopia.se (Postfix) with ESMTP id EF5B3584F7E; Fri, 24 Apr 2026 10:12:41 +0200 (CEST) Received: from localhost (unknown [172.22.191.5]) by s979.loopia.se (Postfix) with ESMTP id EBAF310BC425; Fri, 24 Apr 2026 10:12:41 +0200 (CEST) X-Virus-Scanned: amavis at amavis.loopia.se X-Spam-Flag: NO X-Spam-Score: -1.2 X-Spam-Level: X-Spam-Status: No, score=-1.2 tagged_above=-999 required=6.2 tests=[ALL_TRUSTED=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1] autolearn=disabled Authentication-Results: s473.loopia.se (amavis); dkim=pass (2048-bit key) header.d=yesql.se Received: from s979.loopia.se ([172.22.191.6]) by localhost (s473.loopia.se [172.22.190.13]) (amavis, port 10024) with UTF8LMTP id h56CvQT70P3c; Fri, 24 Apr 2026 10:12:41 +0200 (CEST) X-Loopia-Auth: user X-Loopia-User: daniel@yesql.se X-Loopia-Originating-IP: 89.255.232.236 Received: from smtpclient.apple (customer-89-255-232-236.stosn.net [89.255.232.236]) (Authenticated sender: daniel@yesql.se) by s979.loopia.se (Postfix) with ESMTPSA id 83AAD10BC333; Fri, 24 Apr 2026 10:12:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yesql.se; s=loopiadkim1707475645; t=1777018361; bh=vLmOcpWumfvfLMAK6PmHRqH4c3zSgmITUHzipE1VDsg=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=iipGQqm3GdPuht7lADXZT+II9UE0K7vmWsQVpihjz56MqK4oySKei250Xp/PJ4QiJ WBjqHK61Q+tcGaYRIFni0CrDI5E+oWtysUtb90st+/1+p9erzSEU+imL48pAPSZLnF DB3YYYrhzvcoKCYV0X27OBVHBPa/KtoIkOVLLp9zEe9gBqs4A/rUpy7DcBIxJ25l0l hBJrmPB8FPTUXySPuuAgLy/SYdGRwctfCOXEHSDvfxYFAU96rYZmSlY5taJnczEGjt aQ5XIBfgMQCpaAnwkyv77cmrk6kYqy8yoENbAlXdhMw4RBwrHlgQUBntAMlTfW1aME wDRnWULXjaSuw== Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51.11.2\)) Subject: Re: to_date()/to_timestamp() silently accept month=0 and day=0 From: Daniel Gustafsson In-Reply-To: Date: Fri, 24 Apr 2026 10:12:31 +0200 Cc: Ayush Tiwari , Tom Lane , pgsql-bugs@lists.postgresql.org Content-Transfer-Encoding: 7bit Message-Id: References: <1444609.1776958814@sss.pgh.pa.us> To: Michael Paquier X-Mailer: Apple Mail (2.3776.700.51.11.2) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 24 Apr 2026, at 00:14, Michael Paquier 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? -- Daniel Gustafsson