Re: [BUGS] timestamp issue

2011-02-17 Thread Tom Lane
Heikki Linnakangas writes: > On 17.02.2011 08:06, Sachin Srivastava wrote: >> postgres=# SELECT now() - '7 days' AS week_behind; >> ERROR: invalid input syntax for type timestamp with time zone: "7 days" >> Now, if '+' operator works with '7 days', why dint the '-' operator? Is >> this intentio

Re: [BUGS] timestamp issue

2011-02-16 Thread Heikki Linnakangas
On 17.02.2011 08:06, Sachin Srivastava wrote: postgres=# SELECT now() + '7 days' AS week_ahead; week_ahead -- 2011-02-24 10:39:29.951931+05:30 (1 row) postgres=# SELECT now() - '7 days' AS week_behind; ERROR: invalid input syntax for type timestamp

[BUGS] timestamp issue

2011-02-16 Thread Sachin Srivastava
Hello all, I am running PostgreSQL 9.0.2 on Mac (10.6.6) This is what I get in the psql terminal: postgres=# SELECT version(); version ---