More fun with BETWEEN

Started by Rod Taylorover 23 years ago2 messages
#1Rod Taylor
rbt@zort.ca

I've nearly finished off the patch Christopher distributed. Creates the
between node, and passes all regression tests except horology. I need
to update outfuncs and readfuncs -- but hope to fix the below first.

Seems I have a funny case left (Note the last comparison should be
false):

regression=# select 3 between 2 and 4;
?column?
----------
t
(1 row)

regression=# select 5 between 2 and 4;
?column?
----------
f
(1 row)

regression=# select 1 between 2 and 4;
?column?
----------
f
(1 row)

regression=# select 3 between 2 and 4 and 5 between 2 and 4;
?column?
----------
f
(1 row)

regression=# select 3 between 2 and 4 and 3 between 2 and 4;
?column?
----------
t
(1 row)

regression=# select 3 between 2 and 4 and 1 between 2 and 4;
?column?
----------
t
(1 row)

The patch can be found at:
http://www.zort.ca/patches/postgresql_misc/between.patch

<a href="http://www.zort.ca/patches/postgresql_misc/between.patch&quot;&gt;PATCH
HERE</a>

#2Rod Taylor
rbt@zort.ca
In reply to: Rod Taylor (#1)
Re: More fun with BETWEEN

Seems I have a funny case left (Note the last comparison should be
false):

Ugh... I forgot to initialize the result -- so it picked up the previous
calls value.