Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gEtn7-00060A-FL for pgsql-general@arkaria.postgresql.org; Tue, 23 Oct 2018 10:20:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gEtn4-0004yJ-N0 for pgsql-general@arkaria.postgresql.org; Tue, 23 Oct 2018 10:19:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gEtn4-0004yC-Co for pgsql-general@lists.postgresql.org; Tue, 23 Oct 2018 10:19:58 +0000 Received: from mout02.posteo.de ([185.67.36.66]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gEtn1-0004cW-Dk for pgsql-general@lists.postgresql.org; Tue, 23 Oct 2018 10:19:57 +0000 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id ACA592400FB for ; Tue, 23 Oct 2018 12:19:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1540289993; bh=Kh/q4aCJ0HzlB5XJHjqHA3HmzYX02vgy6bawC9a8fBs=; h=From:Date:To:Subject:From; b=S6j4+3ETsvBFqyh//8EDl0jpKPLUHkNpfNpqbfRATCziswsclL2OUwYc7+e5BhFEw tQs37xuWE6t/udQKHbzmnhhfMR+RWAok6lMGaowBYLPazShPjdpqmzMbWVJCWxteWB s9PYAhQI5MYeJRF4r1x/Dh9XqTKm7b0CPBcfpMYT9ZY81UnecwM+Q1khGrurhNOWv5 FsJ4hm70sL7x/ocYkuXOp6QD/8pTnKhl3iB6PFcR+U84XJVm4BDDMxmS9Eh1hjSF7r xzDCouwEILX4IIn1j2cYlZcVmSA7uwOc2n5RWUCJqGu/F6JmWC5g6z4YKn+mthTd1U vgZM0M/tK9SxQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 42fTsM1FnTz9rxS for ; Tue, 23 Oct 2018 12:19:50 +0200 (CEST) Received: by posteo.de (sSMTP sendmail emulation); Tue, 23 Oct 2018 12:19:49 +0200 From: "Lutz Horn" Date: Tue, 23 Oct 2018 12:19:49 +0200 To: pgsql-general@lists.postgresql.org Subject: Re: Select "todays" timestamps in an index friendly way Message-ID: <20181023101949.GC21523@lutz-pc.ecm4u.intra> References: <20181023093801.GA21523@lutz-pc.ecm4u.intra> <4f78c8fc-d4bd-4219-2877-12004f4dda90@gmx.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4f78c8fc-d4bd-4219-2877-12004f4dda90@gmx.net> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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