Re: Date and Time or Timestamp?
От | Josh Berkus |
---|---|
Тема | Re: Date and Time or Timestamp? |
Дата | |
Msg-id | 200304291731.42143.josh@agliodbs.com обсуждение исходный текст |
Ответ на | Date and Time or Timestamp? (Dave Stewart <dstewart@aquaflo.com>) |
Ответы |
Re: Date and Time or Timestamp?
|
Список | pgsql-novice |
Dave, > On CMD's Practical Postgres page > <http://www.commandprompt.com/ppbook/index.lxp?lxpwrap=x2632%2ehtm>, > Table 3-14 claims a timestamp has a range of 1903AD to 2037AD. Not at all correct, at least since 7.2.x: staffos=# select version(); version --------------------------------------------------------------- PostgreSQL 7.2.4 on i686-pc-linux-gnu, compiled by GCC 2.95.3 (1 row) staffos=# select '2099-09-27'::TIMESTAMP; timestamptz --------------------- 2099-09-27 00:00:00 (1 row) staffos=# select '2099-09-27'::TIMESTAMP + '30 days'::INTERVAL; ?column? --------------------- 2099-10-27 00:00:00 (1 row) staffos=# select '2999-09-27'::TIMESTAMP + '30 days'::INTERVAL; ?column? --------------------- 2999-10-27 00:00:00 (1 row) staffos=# select '8999-09-27'::TIMESTAMP + '30 days'::INTERVAL; ?column? --------------------- 8999-10-27 00:00:00 (1 row) I'll admit to not having tested 90,000 AD, but I think we can live with a Y10K bug, don't you? -- Josh Berkus Aglio Database Solutions San Francisco
В списке pgsql-novice по дате отправления: