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@xxxxxxxxxxxxx, and delete the original message. Your cooperation is appreciated. |