Re: BUG #17794: dates with zero or negative years are not accepted

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: postgresql(at)richardneill(dot)org, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17794: dates with zero or negative years are not accepted
Date: 2023-02-16 00:08:10
Message-ID: 2155070.1676506090@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> We just stopped doing this "shift-by-one" in probably the one arguable case
> where doing so made sense.
> https://github.com/postgres/postgres/commit/489c9c3407cbfd473c2f8d7863ffaaf6d2e8fcf8

Hmm, yeah, we should have suggested to_date as an alternative. Its use
of a format string makes the parsing problem more tractable.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Aymen Rahal 2023-02-16 10:33:47 Create user mapping without password
Previous Message David G. Johnston 2023-02-15 23:03:07 Re: BUG #17794: dates with zero or negative years are not accepted