pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: pgsql-sql@postgresql.org
Subject: BETWEEN bug?
Date: Wed, 10 Jul 2002 12:35:53 -0700
Message-ID: <200207101235.53848.josh@agliodbs.com> (raw)

Folks,

Why does BETWEEN only work for ascending criteria?  For example:

jwnet=> select '2002-06-07'::TIMESTAMP BETWEEN '2002-06-29'::TIMESTAMP and 
'2002-06-01'::TIMESTAMP;
 ?column?
----------
 f
(1 row)

jwnet=> select '2002-06-07'::TIMESTAMP BETWEEN '2002-06-01'::TIMESTAMP and 
'2002-06-29'::TIMESTAMP;
 ?column?
----------
 t
(1 row)

The above behaviour does not seem logical; is this a SQL spec thing, or a bug?

-- 
-Josh Berkus




view thread (4+ messages)  latest in thread

Message-ID: <200207101235.53848.josh@agliodbs.com>
Permalink:  ../200207101235.53848.josh@agliodbs.com/
Also on:    postgresql.org/message-id/200207101235.53848.josh@agliodbs.com

 · 

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: josh@agliodbs.com
  Subject: Re: BETWEEN bug?
  In-Reply-To: <200207101235.53848.josh@agliodbs.com>

* 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