Results 1 to 3 of 3
  1. #1
    Join Date
    May 2014
    Posts
    16

    Unanswered: How to view the last time a db was refreshed

    is there a table or log in postgresql that I can view to determine the last time a database was refreshed and by who?

  2. #2
    Join Date
    Nov 2003
    Posts
    2,933
    Provided Answers: 12
    I have no idea what you mean with "was refreshed", but if you are looking for a timestamp that stores when a row was last update or inserted, then no, there is no such thing built-in. You need to implement that using triggers on every table.
    I will not read nor answer questions where the SQL code is messy and not formatted properly using [code] tags: http://www.dbforums.com/misc.php?do=bbcode#code

    Tips for good questions:

    http://tkyte.blogspot.de/2005/06/how...questions.html
    http://wiki.postgresql.org/wiki/SlowQueryQuestions
    http://catb.org/esr/faqs/smart-questions.html

  3. #3
    Join Date
    May 2014
    Posts
    20
    You need to have a field in the DB with time-stamp.

    Let say its 't'. then you can use
    select max(t) as Lastentry from public.table_name LIMIT 1;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •