0

My problem is to find the last created item in whole database that consist of 342 tables. And I don't know the table I am seeking for.

How to fetch the last row (or the last touched table) from whole database postgreSQL?

raiym
  • 1,439
  • 1
  • 28
  • 54
  • 4
    This looks like a XY problem. Are you sure that's your need ? – Denys Séguret Jun 15 '15 at 13:42
  • We have a BIG system. And trying to find table that responsible for some thing. And we add something through UI and seeking in db for table that has been changed. No luck yet – raiym Jun 15 '15 at 13:47
  • http://stackoverflow.com/questions/307438/how-can-i-tell-when-a-mysql-table-was-last-updated – Abdulla Nilam Jun 15 '15 at 13:52
  • 1
    There is *no* general way to say "get the most recent change in any table*. If your tables have trigger-maintained timestamp columns then you can do it with a giant `UNION` or a loop over each table in PL/PgSQL using the `information_schema`. – Craig Ringer Jun 16 '15 at 00:45

0 Answers0