AGE() function

Поиск
Список
Период
Сортировка
От Michael Fork
Тема AGE() function
Дата
Msg-id Pine.BSI.4.21.0103141430590.4820-100000@glass.toledolink.com
обсуждение исходный текст
Ответ на Fast Inserts and Hardware Questions  (Orion Henry <orion@trustcommerce.com>)
Ответы Re: AGE() function
Список pgsql-general
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



В списке pgsql-general по дате отправления:

Предыдущее
От: Orion Henry
Дата:
Сообщение: Fast Inserts and Hardware Questions
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Fast Inserts and Hardware Questions