Re: Problem with BETWEEN and a view.

Andrew Snow <als@fl.net.au>

From: Andrew Snow <als@fl.net.au>
To: pgsql-bugs@postgresql.org
Date: 2000-11-15T05:48:32Z
Lists: pgsql-bugs, pgsql-hackers
Further to this, I wish you to note the following works correctly:

# select start, stop from mailredirs where start < CURRENT_TIMESTAMP;
         start          |          stop
------------------------+------------------------
 2000-10-31 17:26:52+11 | 2000-11-25 16:29:01+11
(1 row)

# select start, stop from mailredirs where  stop > CURRENT_TIMESTAMP;
         start          |          stop
------------------------+------------------------
 2000-10-31 17:26:52+11 | 2000-11-25 16:29:01+11
(1 row)


Also, there is definitely only one row in the entire "Values" table that
contains a value of "Just because."

# select * from values where value LIKE 'Just because.';
  id   | attributeid | thingid |     value
-------+-------------+---------+---------------
 13525 |          46 |    1246 | Just because.
(1 row)


Regards,
Andrew.

On Wed, 15 Nov 2000, I wrote:

> 
> I just installed v7.0.3 release on a FreeBSD 4.x system.  (Problem still happened in 7.0.2 too).
> 
> This is the problem I noticed:
> 
> # select * from mailredirs;
>  username |    destination     |         start          |          stop          |    reason
> ----------+--------------------+------------------------+------------------------+---------------
>  als      | andrew@modulus.org | 2000-10-31 17:26:52+11 | 2000-11-25 16:29:01+11 | Just because.
> (1 row)
> 
> # select * from mailredirs where start < CURRENT_TIMESTAMP and stop > CURRENT_TIMESTAMP;
> ERROR:  Bad timestamp external representation 'Just because.'
> 
> Why is it even looking at the 'reason' field??