Bug in date arithmetic
От | David Fetter |
---|---|
Тема | Bug in date arithmetic |
Дата | |
Msg-id | 20090824161207.GE5896@fetter.org обсуждение исходный текст |
Ответы |
Re: Bug in date arithmetic
Re: Bug in date arithmetic |
Список | pgsql-hackers |
Folks, While debugging an error with Aziz (postgres_newbie) Sharief in the #postgresql IRC channel, I found a major POLA violation: $ psql Welcome to psql 8.3.7, the PostgreSQL interactive terminal. Type: \copyright for distribution terms \h for help with SQL commands \? for help with psql commands \g orterminate with semicolon to execute query \q to quit shackle@shackle:5432=# SELECT now() + '900000'; ?column? -------------------------------2009-09-03 19:03:43.195514-07 (1 row) shackle@shackle:5432=# SELECT now() - '900000'; ERROR: date/time field value out of range: "900000" HINT: Perhaps you need a different "datestyle" setting. I'd be tempted to call it a flat-out bug in the first case. Adding a string literal to a timestamptz should just result in an error, IMHO. Cheers, David. -- David Fetter <david@fetter.org> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fetter@gmail.com Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate
В списке pgsql-hackers по дате отправления: