Re: Day of week question

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Andrew Dunstan" <andrew(at)dunslane(dot)net>
Cc: "PostgreSQL Hacker" <pgsql-hackers(at)postgresql(dot)org>, Michael Meskes <meskes(at)postgresql(dot)org>
Subject: Re: Day of week question
Date: 2003-10-05 16:00:25
Message-ID: 888.1065369625@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Andrew Dunstan" <andrew(at)dunslane(dot)net> writes:
> Looks like it is caused by the switch to the Gregorian calendar in 1752,
> when 11 days were chopped out of September ( in England and America -
> elsewhere anywhere between Oct 1582 and early 20th century).

There was some discussion awhile back about extending PG's date code
to know about the Julian calendar, but the idea pretty much died when
it was pointed out that you'd need locale-specific information about
exactly when the switchover occurred.

SQL99 makes it perfectly clear that all datetime values are Gregorian,
for example we find wording like this in the <literal> section:

9) If <date value> is specified, then it is interpreted as a date
in the Gregorian calendar.

So one could argue that the existing PG behavior is SQL-compliant.
I tend to regard this as an easy out, but nonetheless it's an available
defense if someone tries to beat you up about PG's "wrong answers".

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-10-05 17:00:07 Re: [HACKERS] PQfnumber and quoted identifiers
Previous Message Tom Lane 2003-10-05 15:45:40 Re: pgsql-server/ oc/src/sgml/runtime.sgml rc/back ...