pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@commandprompt.com>
Cc: James Kitambara <jameskitambara@yahoo.co.uk>
Cc: Srikanth <rssrik@yahoo.co.in>
Cc: pgsql-sql@postgresql.org
Subject: Re: SQL to Check whether "AN HOUR PERIOD" is between start and end timestamps
Date: Thu, 02 Apr 2009 11:00:42 -0400
Message-ID: <22529.1238684442@sss.pgh.pa.us> (raw)
In-Reply-To: <20090402135404.GD3163@alvh.no-ip.org>
References: <19947.64230.qm@web94606.mail.in2.yahoo.com>
	<49BFBC61.9020006@archonet.com>
	<849335.93192.qm@web27903.mail.ukl.yahoo.com>
	<20090402135404.GD3163@alvh.no-ip.org>

Alvaro Herrera <alvherre@commandprompt.com> writes:
> Another way to phrase the WHERE clause is with the OVERLAPS operator,
> something like this:

> WHERE (start_ts, end_ts) OVERLAPS ('2008-12-07 07:59:59', '2008-12-07 08:59:59')

> What I'm not so sure about is how optimizable this construct is.

Not at all :-(  --- or at least, our code doesn't do anything with
it currrently; I shouldn't claim that it's impossible to optimize.

			regards, tom lane



view thread (5+ messages)  latest in thread

Message-ID: <22529.1238684442@sss.pgh.pa.us>
Permalink:  ../22529.1238684442@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/22529.1238684442@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, alvherre@commandprompt.com, jameskitambara@yahoo.co.uk, rssrik@yahoo.co.in
  Subject: Re: SQL to Check whether "AN HOUR PERIOD" is between start and end timestamps
  In-Reply-To: <22529.1238684442@sss.pgh.pa.us>

* 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