FEATURE REQUEST
Please describe the feature you are requesting, as well as your proposed use case.
From the forum: https://forum.cockroachlabs.com/t/on-update-current-timestamp/1895
We currently support DEFAULT current_timestamp() when creating a table, but do not support the additional ON UPDATE current_timestamp() default, as described here in the mysql docs: https://dev.mysql.com/doc/refman/8.0/en/timestamp-initialization.html. The consequence (I believe) is that users would need to manage updates in app in order to adopt CRDB.
I brought this up in the forum. I believe in Postgre world, this needs to handle with trigger. CRDB does not have trigger now, but I believe the last modified date for a row is a very needed feature. Are there any internal/hidden column which contains this info?
some ping after almost 2 years now :)
I think this wouldn't be too hard to implement. It would insert into the executed query an update for all the onUpdate configured columns (probably similar to comments?) and the rest doesn't needs to be touched. So it needs additional metadata and similar action like defaultValue for inserting data.
Most helpful comment
some ping after almost 2 years now :)