pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: postgresql@richardneill.org
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17794: dates with zero or negative years are not accepted
Date: Wed, 15 Feb 2023 19:08:10 -0500
Message-ID: <2155070.1676506090@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwY3BiDdxBi6CMWNuP-pzo+O4Ui6qGtbhPMJU8J5aTGmfw@mail.gmail.com>
References: <17794-1ddd1f50f9df08a1@postgresql.org>
	<CAKFQuwY3BiDdxBi6CMWNuP-pzo+O4Ui6qGtbhPMJU8J5aTGmfw@mail.gmail.com>

"David G. Johnston" <david.g.johnston@gmail.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





view thread (5+ messages)

Message-ID: <2155070.1676506090@sss.pgh.pa.us>
Permalink:  ../2155070.1676506090@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2155070.1676506090@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 using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, postgresql@richardneill.org, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17794: dates with zero or negative years are not accepted
  In-Reply-To: <2155070.1676506090@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