pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Lutz Horn <lutz.horn@posteo.de>
To: pgsql-general@lists.postgresql.org
Subject: Re: Select "todays" timestamps in an index friendly way
Date: Tue, 23 Oct 2018 12:19:49 +0200
Message-ID: <20181023101949.GC21523@lutz-pc.ecm4u.intra> (raw)
In-Reply-To: <4f78c8fc-d4bd-4219-2877-12004f4dda90@gmx.net>
References: <20181023093801.GA21523@lutz-pc.ecm4u.intra>
	<4f78c8fc-d4bd-4219-2877-12004f4dda90@gmx.net>

Hi Thomas,

On Tue, Oct 23, 2018 at 12:11:55PM +0200, Thomas Kellerer wrote:
> I typically use:
> 
>   where ts >= date '2018-10-23'
>     and ts < date '2018-10-23' + 1

But here the date is an explicit value. Francisco reworded my question:

> if your definition of today is 'same value as now() when truncated to
> days'

That's what I am (was, thanks to Francisco) looking for.

Lutz




view thread (13+ messages)  latest in thread

Message-ID: <20181023101949.GC21523@lutz-pc.ecm4u.intra>
Permalink:  ../20181023101949.GC21523@lutz-pc.ecm4u.intra/
Also on:    postgresql.org/message-id/20181023101949.GC21523@lutz-pc.ecm4u.intra

 · 

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: lutz.horn@posteo.de
  Subject: Re: Select "todays" timestamps in an index friendly way
  In-Reply-To: <20181023101949.GC21523@lutz-pc.ecm4u.intra>
  References: <20181023093801.GA21523@lutz-pc.ecm4u.intra> <4f78c8fc-d4bd-4219-2877-12004f4dda90@gmx.net> <20181023101949.GC21523@lutz-pc.ecm4u.intra>

* 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