Can someone tell me what I am missing here...

Thanks

Michael Fork - CCNA - MCP - A+
Network Support - Toledo Internet Access - Toledo Ohio

radius=# BEGIN;
BEGIN
radius=# select age(tstamp, now()) from radacct limit 1;
     age      
--------------
 03:37:08 ago
(1 row)

radius=# select age(now(), tstamp) from radacct limit 1;
   age    
----------
 03:37:08
(1 row)

radius=# SELECT count(*) FROM radacct WHERE age(now(), tstamp) > '6
months'::interval;
 count  
--------
 128378
(1 row)

-- Up until this points everything makes sense, however what follows
-- does not

radius=# SELECT count(*) FROM radacct WHERE age(tstamp, now()) > '6 months
ago'::interval;
  count  
---------
 1988641
(1 row)

-- Shouldn't this be equal to the previous query (flipped the arguments
-- and added 'ago'

radius=# SELECT count(*) FROM radacct WHERE age(tstamp, now()) > '6
months'::interval;
 count 
-------
     0
(1 row)

-- Since the previous query didn't work, I thought that this would return
-- the right number of rows, but I was wrong



---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to