Logging of changed fields/columns in DB updates
Our product ecosystem: Web/Enterprise Application using EJB in Glassfish V3 and Post开发者_如何学编程greSQL 8.4.
How to detect which field was changed without using dirty flags or re-reading the same record(s) before updating it ? Why: For audit purpose/logging
Any recipes or ideas ?
Thanks Sven
In PostgreSQL, write trigger on UPDATE that compares values in NEW and OLD, and reports somehow what has changed.
精彩评论