Re: two digit years in inserts - Mailing list pgsql-general

From Tom Lane
Subject Re: two digit years in inserts
Date
Msg-id 25687.1097072632@sss.pgh.pa.us
Whole thread Raw
In response to two digit years in inserts  (Justin Wyer <justin@isogo.co.za>)
Responses Re: two digit years in inserts  (Justin Wyer <justin@isogo.co.za>)
List pgsql-general
Justin Wyer <justin@isogo.co.za> writes:
> I have this problem, I wrote a script to insert data into a table, one
> of the columns is a birthdate now I only have the last two year digits,
> and this all worked fine. Until I did a portupgrade (i am running on bsd
> 5.2.1 and 4.8 and postgresql 7.3.6 & 7.3.7 respectively) script worked
> fine before the upgrade, now however, any year before 70 gets inserted
> as 20xx and not 19xx.

> My question is between which versions did this behaviour change, and is
> there any way for me to force the old behaviour?

Don't you think it's time to fix your data?  2-digit years were a bad
idea from the get-go, but it was possible to get away with it for awhile
near the end of a century.

            regards, tom lane

pgsql-general by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: OT: spherical geometry (Re: earthdistance is not giving ...)
Next
From: Justin Wyer
Date:
Subject: Re: two digit years in inserts