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 15:57:28 +0200
Message-ID: <20181023135728.GE21523@lutz-pc.ecm4u.intra> (raw)
In-Reply-To: <CA+bJJbziH8xXSg+4KsSpiWCyX3ORCvcrxKk_d5SRc95AGWZa8A@mail.gmail.com>
References: <20181023093801.GA21523@lutz-pc.ecm4u.intra>
	<4f78c8fc-d4bd-4219-2877-12004f4dda90@gmx.net>
	<20181023101949.GC21523@lutz-pc.ecm4u.intra>
	<85054faa-c527-f9e8-d3a8-b68d4d26421f@gmx.net>
	<CAN3Qy4q7uGC8-EUOvD5fdXUdVHMwP2j6mauW1g+RbGSuBT6BgQ@mail.gmail.com>
	<CA+bJJbziH8xXSg+4KsSpiWCyX3ORCvcrxKk_d5SRc95AGWZa8A@mail.gmail.com>

On Tue, Oct 23, 2018 at 03:50:14PM +0200, Francisco Olarte wrote:
> It'is not as the problem was stated. Although ts defaulted to now(),
> and it is probably defaulted, nothing prohibits him from inserting
> timestamps in the future.

Yes, this table is only used as an example for the technical question.
In my real use case there are columns like "due_date" which usually
contain future dates inserted by application code.

> the  "timestamps in today" pattern is commonly used in calendaring
> applications, which usually insert appointments in the future and
> recover this way to print "todays schedule".

Exactly. The application must be able to execute queries like "give me
all my tasks due today" without having to use a concrete value for
"today".

Lutz




view thread (13+ messages)  latest in thread

Message-ID: <20181023135728.GE21523@lutz-pc.ecm4u.intra>
Permalink:  ../20181023135728.GE21523@lutz-pc.ecm4u.intra/
Also on:    postgresql.org/message-id/20181023135728.GE21523@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: <20181023135728.GE21523@lutz-pc.ecm4u.intra>
  References: <20181023093801.GA21523@lutz-pc.ecm4u.intra> <4f78c8fc-d4bd-4219-2877-12004f4dda90@gmx.net> <20181023101949.GC21523@lutz-pc.ecm4u.intra> <85054faa-c527-f9e8-d3a8-b68d4d26421f@gmx.net> <CAN3Qy4q7uGC8-EUOvD5fdXUdVHMwP2j6mauW1g+RbGSuBT6BgQ@mail.gmail.com> <CA+bJJbziH8xXSg+4KsSpiWCyX3ORCvcrxKk_d5SRc95AGWZa8A@mail.gmail.com> <20181023135728.GE21523@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