Search Postgresql Archives

Re: ERROR: operator does not exist: timestamp without time zone + integer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>>>> "Adrian" == Adrian Klaver <adrian.klaver@xxxxxxxxxxx> writes:

 >> yeesh. that's a very long-winded way to write current_date + 7

 Adrian> Yeah, I was just working of the OP's original DEFAULT:

 Adrian> site_mode_date timestamp NOT NULL DEFAULT date_trunc('day',
 Adrian> LOCALTIMESTAMP)+7,

Right, but since all these are exactly equivalent:

CURRENT_DATE
LOCALTIMESTAMP::date
date_trunc('day',LOCALTIMESTAMP)::date

and since date can be cast to timestamp, then DEFAULT current_date+7
would seem to be the simplest answer.

-- 
Andrew (irc:RhodiumToad)





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux