The age() of a column?

Поиск
Список
Период
Сортировка
От Ron
Тема The age() of a column?
Дата
Msg-id 5e967a88-1054-5559-0712-44ef00b6b7c1@gmail.com
обсуждение исходный текст
Ответы Re: The age() of a column?  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: The age() of a column?  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general
What does it mean, and where is it documented?  The only place in the docs I 
see reference to age() is 
https://www.postgresql.org/docs/9.6/functions-datetime.html and this doesn't 
seem to fit that use case.

Thanks

TAPb=# select COALESCE(ta.schemaname, 'pg_toast') || '.' || cl.relname,
        cl.relfrozenxid,
        age(cl.relfrozenxid)
from pg_class cl FULL JOIN pg_tables ta
     ON ta.tablename = cl.relname
where not cl.relfrozenxid = xid '0'
   --and age(cl.relfrozenxid) > 4000000
order by 1
limit 30;
            ?column?            | relfrozenxid |   age
-------------------------------+--------------+---------
cds.ach_return_batch           |     58569152 | 2111005
cds.ach_return_detail          |     58569152 | 2111005
cds.all_day_event              |     58569152 | 2111005
cds.all_day_event_trigger      |     58569152 | 2111005
[snip]
cds.bank_ftp                   |     58569152 | 2111005
cds.bank_health_care_job       |     58569152 | 2111005
cds.bank_inbound_file          |     58569152 | 2111005
cds.bank_input_format          |     58569152 | 2111005
(30 rows)


-- 
Angular momentum makes the world go 'round.


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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: surprising query optimisation
Следующее
От: Tom Lane
Дата:
Сообщение: Re: The age() of a column?