OSDN Git Service

Please find a small patch to fix the brain damage "century" and
authorBruce Momjian <bruce@momjian.us>
Sat, 10 Apr 2004 18:02:59 +0000 (18:02 +0000)
committerBruce Momjian <bruce@momjian.us>
Sat, 10 Apr 2004 18:02:59 +0000 (18:02 +0000)
commit1934055cbe0b4ae29f6008154eb8b34a30c83816
tree9414239274abd4ca3afb90471e8c2df6da288cd0
parent296f485492a4d5954588a9b904f5ddc3f8e56de7
Please find a small patch to fix the brain damage "century" and
"millennium" date part implementation in postgresql, both in the code
and the documentation, so that it conforms to the official definition.
If you do not agree with the official definition, please send your
complaint to "pope@vatican.org". I'm not responsible for them;-)

With the previous version, the centuries and millenniums had a wrong
number and started the wrong year. Moreover century number 0, which does
not exist in reality, lasted 200 years. Also, millennium number 0 lasted
2000 years.

If you want postgresql to have it's own definition of "century" and
"millennium" that does not conform to the one of the society, just give
them another name. I would suggest "pgCENTURY" and "pgMILLENNIUM";-)

IMO, if someone may use the options, it means that postgresql is used for
historical data, so it make sense to have an historical definition. Also,
I just want to divide the year by 100 or 1000, I can do that quite easily.

BACKWARD INCOMPATIBLE CHANGE

Fabien Coelho - coelho@cri.ensmp.fr
doc/src/sgml/func.sgml
src/backend/utils/adt/timestamp.c
src/test/regress/expected/date.out
src/test/regress/sql/date.sql