title: Is there a more elegant way to detect changes in a large SQL table without altering it?
body: <p>Suppose you have a reasonably large (for local definitions of “large”), but relatively stable table.</p>
  
  <p>Right now, I want to take a checksum of some kind (any kind) of the contents of the entire table.</p>
  
  <p>The naïve approach might be to walk the entire table, taking the checksum (say, MD5) of the concatenation of every column on each row, and then perhaps concatenate them and take its MD5sum.</p>
  
  <p>From the client side, that might be optimized a little by progressively appending columns' values into the MD5 sum routine, progressively mutating the value.</p>
  
  <p>The reason for this, is that at some point in future, we want to re-connect to the database, and ensure that no other users may have mutated the table: that includes INSERT, UPDATE, and DELETE.</p>
  
  <p>Is there a nicer way to determine if <em>any</em> change/s have occurred to a particular table? Or a more efficient/faster way?</p>
  
  <p><strong>Update/clarification:</strong></p>
  
  <ul>
  <li>We are not able/permitted to make any alterations to the table itself (e.g. adding a “last-updated-at” column or triggers or so forth)</li>
  </ul>
  
  <p>(This is for Postgres, if it helps. I'd <em>prefer</em> to avoid poking transaction journals or anything like that, but if there's a way to do so, I'm not against the idea.)</p>