Re: [HACKERS] postgres and year 2000

From: Tom Ivar Helbekkmo <tih(at)nhh(dot)no>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>, PostgreSQL Hackers <hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] postgres and year 2000
Date: 1999-01-12 19:55:19
Message-ID: 86zp7op8pk.fsf@athene.nhh.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> I agree with Tom Lockhart on this one.

So do I, actually. However:

> > I suppose we could consider a compile-time or run-time option to
> > constrain dates to a single style.
>
> I see no need to do that.

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. It
may be that even this should be an option, and the dangerous mixture,
where there are two years between between the starts of year '99' and
year '2001', should be available on front-end application request.

I would suggest that the defaults be safe, though, probably ISO 8601.

-tih
--
Popularity is the hallmark of mediocrity. --Niles Crane, "Frasier"

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message D'Arcy J.M. Cain 1999-01-13 02:43:36 SUM() and GROUP BY
Previous Message Bruce Momjian 1999-01-12 17:25:09 Re: [HACKERS] lock deadlocks