Re: [HACKERS] pgsql y2k bug? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] pgsql y2k bug?
Date
Msg-id 20762.946778782@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] pgsql y2k bug?  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: [HACKERS] pgsql y2k bug?
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> I am attaching a diff to fix the problem.  We were reporting only a
> 2-digit year, and tm_year reports years since 1900, so it was reporting
> 100 for year 2000.  The field was %02d, but the number was three digits
> so it printed all three.

If you are going to go to 4-digit years in timestamps, I think you also
need to increase the TIMESTAMP_SIZE constant used by elog.c when
ELOG_TIMESTAMPS is set.

An alternative solution is to print time->tm_year % 100.

Either of these solutions might break existing programs that analyze
logfiles, if any there be...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Is DATEDEBUG useful
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] pgsql y2k bug?