Re: [HACKERS] postgres and year 2000 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] postgres and year 2000
Date
Msg-id 18024.916240966@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] postgres and year 2000  (Tom Ivar Helbekkmo <tih@nhh.no>)
Responses RE: [HACKERS] postgres and year 2000
List pgsql-hackers
Tom Ivar Helbekkmo <tih@nhh.no> writes:
> Not compile-time, no.  But I think it would be a good thing to have
> several run-time options (of which PostgreSQL already has a few), to
> specify exactly which behavior is wanted.  For two digit years, it
> might be useful to be able to specify to the backend that they should
> be handled as, say, 1920-2019, or as the chronologically nearest year
> that ends in the two given digits, or maybe even as being in the
> current century.  When using a four digit year mode, though, I think
> it's a good idea to handle '99' as the year 99, and not e.g. 1999.

IIRC, we already have both behaviors (99->1999AD and 99->99AD)
available, but it's controlled by a combination of the DATESTYLE setting
and the actual formatting of the particular input string.

There doesn't seem to be anything in the documentation about exactly
how ambiguous inputs are parsed.  Thomas, maybe some text needs to
be added?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Brook Milligan
Date:
Subject: Re: [HACKERS] RPM maintainer?
Next
From: "Thomas G. Lockhart"
Date:
Subject: Re: [HACKERS] postgres and year 2000