Re: to_date() and to_timestamp() with negative years - Mailing list pgsql-general

From Tom Lane
Subject Re: to_date() and to_timestamp() with negative years
Date
Msg-id 265331.1635978234@sss.pgh.pa.us
Whole thread Raw
In response to Re: to_date() and to_timestamp() with negative years  (Adrian Klaver <adrian.klaver@aklaver.com>)
Responses Re: to_date() and to_timestamp() with negative years
List pgsql-general
Adrian Klaver <adrian.klaver@aklaver.com> writes:
> Haven't had time to work through what the above is actually doing.

I think the first two are explained by 489c9c340:

    Also, arrange for the combination of a negative year and an
    explicit "BC" marker to cancel out and produce AD.  This is how
    the negative-century case works, so it seems sane to do likewise.

The last two look like a parsing issue: with no field separator
(nope, the space doesn't count), the code is taking the dash
as a field separator.

            regards, tom lane



pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: to_date() and to_timestamp() with negative years
Next
From: Bryn Llewellyn
Date:
Subject: Re: to_date() and to_timestamp() with negative years