Feature / Enhancement request.
От | Melvin Davidson |
---|---|
Тема | Feature / Enhancement request. |
Дата | |
Msg-id | 27427_1251217095_n7PGIANC003562_2594739A5DA9FB439DA88E61EA12430114420F052A@DFW1MXM01.RACKSPACE.CORP обсуждение исходный текст |
Ответы |
Re: Feature / Enhancement request.
(Jaime Casanova <jcasanov@systemguards.com.ec>)
Re: Feature / Enhancement request. (Josh Berkus <josh@agliodbs.com>) |
Список | pgsql-hackers |
<div class="Section1"><p class="MsoNormal"><span style="color:black">It would really be nice if pg_class were altered toadd two new columns: relcreatedat & relmoddat. </span><p class="MsoNormal"><span style="color:black">Both would beof type timestamp. relcreatedat would contain the timestamp the object was created. </span><span style="color:#0000CC"></span><pclass="MsoNormal"><span style="color:black">Likewise, relmoddat would contain the last timestampthe object was altered / modified.</span><p class="MsoNormal"><span style="color:black"> </span><p class="MsoNormal"><spanstyle="color:black">This would be very useful for user tables that are meant to exist for only a specificlength of time. eg: 1 month.</span><p class="MsoNormal"><span style="color:black">Then a simple:</span><p class="MsoNormal"><spanstyle="color:black">SELECT relname</span><p class="MsoNormal"><span style="color:black"> FROM pg_class</span><p class="MsoNormal"><span style="color:black">WHERE current_timestamp::date - relcreatedat::date > 30</span><pclass="MsoNormal"><span style="color:black"> AND relname LIKE ‘tmp_%’;</span><p class="MsoNormal"><span style="color:black"> </span><pclass="MsoNormal"><span style="color:black">Would show possible expired tables.</span><p class="MsoNormal"><spanstyle="color:black"> </span><p class="MsoNormal"><span style="color:black">Likewise, relmoddat wouldbe useful for determining when someone made changes to a table, index, view, etc.</span><p class="MsoNormal"><span style="color:black"> </span><pclass="MsoNormal"><b><span style="font-size:10.5pt;font-family:Consolas; color:blue">Melvin Davidson – DBA</span></b><p class="MsoNormal"> </div><pre> 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. </pre>
В списке pgsql-hackers по дате отправления: