Thread: a "bug" in v6.4.3 ...

a "bug" in v6.4.3 ...

From
The Hermit Hacker
Date:
Just trying to clean up alot of old code, and came across this:

acctng=> select max(start_time) from radhist where userid='billchuck';
max
---  
(1 row)

acctng=> select * from radhist where userid='billchuck';
uniq_id|term_server|userid|ip_addr|port|start_time|stop_time|slipl
-------+-----------+------+-------+----+----------+---------+-----
(0 rows)

acctng=> 

IMHO, the first select should return 0 rows, not 1, if no values are
found...no?

Marc G. Fournier                                
Systems Administrator @ hub.org 
primary: scrappy@hub.org           secondary: scrappy@{freebsd|postgresql}.org 



Re: [HACKERS] a "bug" in v6.4.3 ...

From
"Thomas G. Lockhart"
Date:
> acctng=> select max(start_time) from radhist where userid='billchuck';
> max
> ---
> 
> (1 row)
> IMHO, (this) should return 0 rows, not 1, if no values are
> found...no?

We've had discussions on this. I vaguely recall that others disagreed
with my opinion that this behavior is consistant. Can't recall if others
had standards on their side ;)

Given that NULL means "don't know", I'm happy with the current result...
                      - Tom