"Magnus Naeslund(f)" <mag@fbab.net> writes:
> pilsl@goldfisch.at wrote:
>> something like
>> select current_timestamp+interval '7 days';
> Is there any reason why you can't do:
> sprintf(buf,"select current_timestamp+interval '%d days'",int_days);
Also, if you really only want the result to the nearest day, date
arithmetic (as opposed to timestamp arithmetic) works the way you want.
For example,
regression=# select current_date, current_date + 7;
date | ?column?
------------+------------
2003-02-08 | 2003-02-15
(1 row)
regards, tom lane