Re: Adding to a date/time?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jean-Christian Imbeault <jc(at)mega-bucks(dot)co(dot)jp>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Adding to a date/time?
Date: 2002-09-19 14:21:17
Message-ID: 25634.1032445277@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jean-Christian Imbeault <jc(at)mega-bucks(dot)co(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Shridhar Daithankar 2002-09-19 14:22:32 Re: Memory Errors...
Previous Message Ian Harding 2002-09-19 14:10:50 Memory Errors...