Re: Using make_timestamp() to create a BC value

2021-10-06 Thread Bryn Llewellyn
> t...@sss.pgh.pa.us wrote: > >> Bryn wrote: >> >> 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

Re: Using make_timestamp() to create a BC value

2021-10-06 Thread Tom Lane
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: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

Re: Using make_timestamp() to create a BC value

2021-10-06 Thread Adrian Klaver
On 10/6/21 2:59 PM, Bryn Llewellyn wrote: Everything that I say here applies to "make_timestamptz()", too. But my code examples need less typing when I use plain "make_timestamp()". (And sure enough, "raise info 'year: %', year" reports "-1".) The doc for "make_timestamp()" here: www.p

Using make_timestamp() to create a BC value

2021-10-06 Thread Bryn Llewellyn
Everything that I say here applies to "make_timestamptz()", too. But my code examples need less typing when I use plain "make_timestamp()". It would seem to me that ordinary principles of good software design let one expect that the rule that this procedure tests ought to hold: create procedure