Re: Day of week question - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Day of week question
Date
Msg-id 888.1065369625@sss.pgh.pa.us
Whole thread Raw
In response to Re: Day of week question  ("Andrew Dunstan" <andrew@dunslane.net>)
Responses Re: Day of week question
List pgsql-hackers
"Andrew Dunstan" <andrew@dunslane.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


pgsql-hackers by date:

Previous
From: Andreas Pflug
Date:
Subject: Re: PQfnumber and quoted identifiers
Next
From: Tom Lane
Date:
Subject: Re: PQfnumber and quoted identifiers