Re: ERROR: operator does not exist: timestamp without time zone +integer - Mailing list pgsql-general

From Adrian Klaver
Subject Re: ERROR: operator does not exist: timestamp without time zone +integer
Date
Msg-id 1e02f867-5b18-0f0d-2aae-4f28bc3300e3@aklaver.com
Whole thread Raw
In response to Re: ERROR: operator does not exist: timestamp without time zone + integer  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Responses Re: ERROR: operator does not exist: timestamp without time zone + integer
List pgsql-general
On 4/30/19 8:00 AM, Andrew Gierth wrote:
>>>>>> "Adrian" == Adrian Klaver <adrian.klaver@aklaver.com> writes:
> 
>   Adrian> Or cast to a date:
> 
>   Adrian> test=> select date_trunc('day', localtimestamp)::date + 7;
> 
> yeesh. that's a very long-winded way to write current_date + 7
> 

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

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


-- 
Adrian Klaver
adrian.klaver@aklaver.com



pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Amazon Linux Support?
Next
From: Andrew Gierth
Date:
Subject: Re: ERROR: operator does not exist: timestamp without time zone + integer