A better BETWEEN for DATEs, TIMEs and TIMESTAMPs?

From: Reg Me Please <regmeplease(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: A better BETWEEN for DATEs, TIMEs and TIMESTAMPs?
Date: 2009-01-14 10:40:52
Message-ID: 200901141140.52598.regmeplease@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

While I do understand that the BETWEEN operator is actually "synctactic
sugar", from time to time I find myself wondering about a better BETWEEN for
DATEs, TIMEs and TIMESTAMPs (but not only these ones).

Infact I always have managed ranges where the lower part is to be matched with
the ">=" comparison operator while the higher part is matched with the "<".
In other words, until now I've always encountered intervals of the
type "[...)" and not "[...]".

Wouldn't it be nice to have a version of the BETWEEN operator which uses
such a kind of intervals?

--
Fahrbahn ist ein graues Band
weisse Streifen, grüner Rand

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Louis-David Mitterrand 2009-01-14 10:46:11 inconsistency in aliasing
Previous Message Jason Long 2009-01-14 01:07:17 Re: Use PSQLFS for photo storage