0

I would like to log any access to the column col in the table schema.table. In particular, I'd like to log the time, user, and command. Is this doable?

The immediate use case is the deprecation of col in favor of a new column. Transitioning isn't automatic, and finding all instances is not straightforward, so having some automation support would be helpful. This is related to What's the best way to deprecate a column in a database schema? and What are the best practices around retiring obsolete database columns?.

1 Answer 1

1

You can use pgAudit to log all access to a column in the PostgreSQL log file.

You would use object audit logging for that.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.