Feature / Enhancement request. - Mailing list pgsql-admin

From Melvin Davidson
Subject Feature / Enhancement request.
Date
Msg-id 26516_1250820824_n7L2Dd6q015740_2594739A5DA9FB439DA88E61EA12430114420EF80F@DFW1MXM01.RACKSPACE.CORP
Whole thread Raw
List pgsql-admin

It would really be nice if pg_class were altered to add two new columns: relcreatedat & relmoddat.

Both would be of type timestamp. relcreatedat would contain the timestamp the object was created. Likewise, relmoddat would contain the last timestamp the object was altered / modified.

 

This would be very useful for user tables that are meant to exist for only a specific length of time. eg: 1  month.

Then a simple:

SELECT relname

 FROM pg_class

WHERE current_timestamp::date - relcreatedat::date > 30

     AND relname LIKE ‘tmp_%’;

 

Would show possible expired tables.

 

Likewise, relmoddat would be useful for determining when someone made changes to a table, index, view, etc.

 

Melvin Davidson – DBA

501-3586

 

Confidentiality Notice: This e-mail message (including any attached or
embedded documents) is intended for the exclusive and confidential use of the
individual or entity to which this message is addressed, and unless otherwise
expressly indicated, is confidential and privileged information of Rackspace.
Any dissemination, distribution or copying of the enclosed material is prohibited.
If you receive this transmission in error, please notify us immediately by e-mail
at abuse@rackspace.com, and delete the original message.
Your cooperation is appreciated.

pgsql-admin by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Sharing /etc/passwd with PostgreSQL
Next
From: "Jan-Peter Seifert"
Date:
Subject: Re: text cast on regprocedure fails on 8.2