开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜