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 or terminate with semicolon to execute query
       \q to quit

shac...@shackle:5432=# SELECT now() + '900000';
           ?column?            
-------------------------------
 2009-09-03 19:03:43.195514-07
(1 row)

shac...@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 <da...@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fet...@gmail.com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to