Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mYFPE-00024N-89 for pgsql-general@arkaria.postgresql.org; Wed, 06 Oct 2021 22:28:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mYFPC-0000sy-Ah for pgsql-general@arkaria.postgresql.org; Wed, 06 Oct 2021 22:28:54 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mYFPC-0000oZ-1E for pgsql-general@lists.postgresql.org; Wed, 06 Oct 2021 22:28:54 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mYFP9-0001lT-RK for pgsql-general@lists.postgresql.org; Wed, 06 Oct 2021 22:28:53 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 196MSoHk005705; Wed, 6 Oct 2021 18:28:50 -0400 From: Tom Lane To: Bryn Llewellyn cc: pgsql-general list Subject: Re: Using make_timestamp() to create a BC value In-reply-to: <010C91D3-9982-445D-B3C1-B20BD1E8C841@yugabyte.com> References: <010C91D3-9982-445D-B3C1-B20BD1E8C841@yugabyte.com> Comments: In-reply-to Bryn Llewellyn message dated "Wed, 06 Oct 2021 14:59:28 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <5703.1633559330.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 06 Oct 2021 18:28:50 -0400 Message-ID: <5704.1633559330@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Bryn Llewellyn writes: > But this invocation makes the assertion fail: > call assert_make_ts_from_extracted_fields_from_ts_ok('0001-01-01 00:00:0= 0 BC'); > The 22008 error is reported thus: > date field value out of range: -1-01-01 As of v14, make_timestamp[tz] will accept negative year values as meaning BC. Before that, they threw errors. regards, tom lane