pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Andrew Gierth <andrew@tao11.riddles.org.uk>
Cc: Thomas Kellerer <spam_eater@gmx.net>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: ERROR: operator does not exist: timestamp without time zone + integer
Date: Tue, 30 Apr 2019 11:55:03 -0700
Message-ID: <1e02f867-5b18-0f0d-2aae-4f28bc3300e3@aklaver.com> (raw)
In-Reply-To: <87d0l3v8t9.fsf@news-spur.riddles.org.uk>
References: <BL0PR01MB51876A1315E10193A51DF8FA9B3A0@BL0PR01MB5187.prod.exchangelabs.com>
	<12869367-4dae-37ee-0a2e-c94d04fc9427@gmx.net>
	<795d66f1-46cf-7171-5442-1ee1618f3e8f@aklaver.com>
	<87d0l3v8t9.fsf@news-spur.riddles.org.uk>

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





view thread (8+ messages)  latest in thread

Message-ID: <1e02f867-5b18-0f0d-2aae-4f28bc3300e3@aklaver.com>
Permalink:  ../1e02f867-5b18-0f0d-2aae-4f28bc3300e3@aklaver.com/
Also on:    postgresql.org/message-id/1e02f867-5b18-0f0d-2aae-4f28bc3300e3@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, andrew@tao11.riddles.org.uk, spam_eater@gmx.net
  Subject: Re: ERROR: operator does not exist: timestamp without time zone + integer
  In-Reply-To: <1e02f867-5b18-0f0d-2aae-4f28bc3300e3@aklaver.com>
  References: <BL0PR01MB51876A1315E10193A51DF8FA9B3A0@BL0PR01MB5187.prod.exchangelabs.com> <12869367-4dae-37ee-0a2e-c94d04fc9427@gmx.net> <795d66f1-46cf-7171-5442-1ee1618f3e8f@aklaver.com> <87d0l3v8t9.fsf@news-spur.riddles.org.uk> <1e02f867-5b18-0f0d-2aae-4f28bc3300e3@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox