Re: Using make_timestamp() to create a BC value

Поиск
Список
Период
Сортировка
От Bryn Llewellyn
Тема Re: Using make_timestamp() to create a BC value
Дата
Msg-id 8B68EF39-3BF5-4426-9D12-30EED5AC1F69@yugabyte.com
обсуждение исходный текст
Ответ на Re: Using make_timestamp() to create a BC value  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
tgl@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] will accept negative year values as meaning BC. Before that, they threw errors.

Ah… that's excellent news. Thanks for the lightening fast response, Tom. Thanks, too, to Adrian who passed on similar news, and this link:


I did my test using PostgreSQL 13.4. Forgive me for not mentioning this.

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Using make_timestamp() to create a BC value
Следующее
От: Thomas Kellerer
Дата:
Сообщение: Misplaced double quotes in error message