Re: Adding to a date/time? - Mailing list pgsql-general

From Tom Lane
Subject Re: Adding to a date/time?
Date
Msg-id 25634.1032445277@sss.pgh.pa.us
Whole thread Raw
In response to Adding to a date/time?  (Jean-Christian Imbeault <jc@mega-bucks.co.jp>)
List pgsql-general
Jean-Christian Imbeault <jc@mega-bucks.co.jp> writes:
> $ psql TMP -c "update invoices set req_del_date3='today+8' where id > 10"

You can't do arithmetic inside a timestamp literal.  The above actually
gets interpreted as "today" (meaning midnight) in timezone "+8", ie,
midnight 8 hours east of GMT.

            regards, tom lane

pgsql-general by date:

Previous
From: "Ian Harding"
Date:
Subject: Memory Errors...
Next
From: "Johnson, Shaunn"
Date:
Subject: killing process question