pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bryn Llewellyn <bryn@yugabyte.com>
Cc: pgsql-general list <pgsql-general@lists.postgresql.org>
Subject: Re: Using make_timestamp() to create a BC value
Date: Wed, 06 Oct 2021 18:28:50 -0400
Message-ID: <5704.1633559330@sss.pgh.pa.us> (raw)
In-Reply-To: <010C91D3-9982-445D-B3C1-B20BD1E8C841@yugabyte.com>
References: <010C91D3-9982-445D-B3C1-B20BD1E8C841@yugabyte.com>

Bryn Llewellyn <bryn@yugabyte.com> writes:
> But this invocation makes the assertion fail:
> call assert_make_ts_from_extracted_fields_from_ts_ok('0001-01-01 00:00:00 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





view thread (4+ messages)  latest in thread

Message-ID: <5704.1633559330@sss.pgh.pa.us>
Permalink:  ../5704.1633559330@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/5704.1633559330@sss.pgh.pa.us

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, bryn@yugabyte.com
  Subject: Re: Using make_timestamp() to create a BC value
  In-Reply-To: <5704.1633559330@sss.pgh.pa.us>
  References: <010C91D3-9982-445D-B3C1-B20BD1E8C841@yugabyte.com> <5704.1633559330@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox