2

In an Exasol database, we want to know for each row when it was last changed.

Other DMBS offer things like hooks/triggers that run arbitrary functions, or even ON UPDATE statements. Searching for these terms, I couldn't find anything specific for Exasol.

Combining last_modified TIMESTAMP DEFAULT CURRENT_TIMESTAMP with last_modified=DEFAULT is possible, but still requires an explicit (if generic) addition to every query.

How can we automatically maintain last-modified timestamps in Exasol?

Raphael
  • 9,779
  • 5
  • 63
  • 94

1 Answers1

1

Simply put, you can't do it automatically on Exasol, because there are no triggers.

What you can do is to create a processor statement which will recognize an update statement and run a second update to modify the last_modified column. Of course the last_modified needs to be in every table where you run an update or you will need to toggle this updating script depending on the target table.

mucio
  • 7,014
  • 1
  • 21
  • 33