0

I have a user table where I save the last connection oft every user. Is there a possibility to see how often the value changes? I can't add a new column for that because old programms use this table and I have fear that they wouldn't work properlly any more.

kostja93
  • 3
  • 2

2 Answers2

0

Not sure if I understand you completely, but you could create another table logging or similar and put data inside with a trigger.

paubo147
  • 748
  • 4
  • 8
  • I can't make any big changes to the database. Isn't there any posibility to see something like a history? – kostja93 Jul 22 '14 at 07:52
0

I would add an update trigger that would log in another table each change.

Take a look at this: Postgresql 9.2 trigger to log changes to data in another table

If it's acceptable for you (small enough number of SQL statemets executed on the server), you could log to a file all SQL statements executed: How to log PostgreSQL queries?

Including csvlog will allow you to import this in a table in (possibly another) Postgresql database, where you can easily filter statements.

Community
  • 1
  • 1